1: This error should be a jar version package conflict, when starting hive, because Hive relies on Hadoop, start Hive, will be the configuration of Hadoop and jar package import into hive, cause the jar Package version conflict, the following error, and then paste the workaround:
1[Email protected] bin]#.Hive2 3Logging initializedusingConfigurationinchjar:file:/home/hadoop/soft/apache-hive-1.2.1-bin/lib/hive-common-1.2.1. jar!/hive-log4j.properties4 [ERROR] Terminal initialization failed; falling back to unsupported5Java.lang.IncompatibleClassChangeError:FoundclassJLine. Terminal, butInterfacewas expected6At JLine. Terminalfactory.create (Terminalfactory.java:101)7At JLine. Terminalfactory.Get(Terminalfactory.java:158)8At Jline.console.consolereader.<init> (Consolereader.java:229)9At Jline.console.consolereader.<init> (Consolereader.java:221)TenAt Jline.console.consolereader.<init> (Consolereader.java:209) OneAt Org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader (Clidriver.java:787) AAt Org.apache.hadoop.hive.cli.CliDriver.executeDriver (Clidriver.java:721) -At Org.apache.hadoop.hive.cli.CliDriver.run (Clidriver.java:681) -At Org.apache.hadoop.hive.cli.CliDriver.main (Clidriver.java:621) the At sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) -At Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java: $) -At Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java: +) -At Java.lang.reflect.Method.invoke (Method.java:606) +At Org.apache.hadoop.util.RunJar.run (Runjar.java:221) -At Org.apache.hadoop.util.RunJar.main (Runjar.java:136) + AExceptioninchThread"Main"Java.lang.IncompatibleClassChangeError:FoundclassJLine. Terminal, butInterfacewas expected atAt Jline.console.consolereader.<init> (Consolereader.java: the) -At Jline.console.consolereader.<init> (Consolereader.java:221) -At Jline.console.consolereader.<init> (Consolereader.java:209) -At Org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader (Clidriver.java:787) -At Org.apache.hadoop.hive.cli.CliDriver.executeDriver (Clidriver.java:721) -At Org.apache.hadoop.hive.cli.CliDriver.run (Clidriver.java:681) inAt Org.apache.hadoop.hive.cli.CliDriver.main (Clidriver.java:621) - At sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) toAt Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java: $) +At Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java: +) -At Java.lang.reflect.Method.invoke (Method.java:606) theAt Org.apache.hadoop.util.RunJar.run (Runjar.java:221) *At Org.apache.hadoop.util.RunJar.main (Runjar.java:136) $[Email protected] bin]#
The jar package inside the 2:hive is Jline-2.12.jar, and Hadooop's jar package is
<!--hive version of this jar package--[email protected] lib]# ll JLine-2.12. Jar-rw-rw-r--.1Root root213854Apr in -jline-2.12. Jar<!--this jar package version of Hadooop--[email protected] lib]# ll/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. Jar-rw-rw-r--.1Hadoop Hadoop87325Mar7 ./home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. Jar[[email protected] lib]#
3: Workaround, replace the new version of Hive with this jar package from older versions of Hadoop:
1[email protected] lib]# ll jline-2.12. Jar2-rw-rw-r--.1Root root213854Apr in -jline-2.12. Jar3[Email protected] lib]# ll/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. Jar4-rw-rw-r--.1Hadoop Hadoop87325Mar7 ./home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. Jar5[Email protected] lib]# rm/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. Jar6Rm:remove regular file '/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. jar'? y7[Email protected] lib]# ll/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. Jar8Ls:cannot access/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. jar:no such file or directory9[email protected] lib]# CP jline-2.12. jar/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/Ten[Email protected] lib]# ll/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. Jar OneLs:cannot access/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94. jar:no such file or directory A[Email protected] lib]# ll/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-2.12. Jar --rw-r--r--.1Root root213854Dec9 +:Ten/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-2.12. Jar -[Email protected] lib]#
Stop more ...
2017-12-10 11:11:16
[ERROR] Terminal initialization failed; falling back to unsupported Java.lang.IncompatibleClassChangeError:Found Class JLine. Terminal, but interface was expected