[ERROR] Terminal initialization failed; falling back to unsupported java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected

1:出现此种错误应该是jar版本包冲突了,启动hive的时候,由于hive依赖hadoop,启动hive,会将hadoop的配置以及jar包等等导入到hive中,导致jar包版本冲突,下面贴一下错误,然后贴一下解决方法:

 [root@master bin]# ./hive

 Logging initialized using configuration in jar:file:/home/hadoop/soft/apache-hive-1.2.-bin/lib/hive-common-1.2..jar!/hive-log4j.properties
[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
at jline.TerminalFactory.create(TerminalFactory.java:)
at jline.TerminalFactory.get(TerminalFactory.java:)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:)
at org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader(CliDriver.java:)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:)
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:)
at org.apache.hadoop.util.RunJar.run(RunJar.java:)
at org.apache.hadoop.util.RunJar.main(RunJar.java:) Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
at jline.console.ConsoleReader.<init>(ConsoleReader.java:)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:)
at org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader(CliDriver.java:)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:)
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:)
at org.apache.hadoop.util.RunJar.run(RunJar.java:)
at org.apache.hadoop.util.RunJar.main(RunJar.java:)
[root@master bin]#

2:hive里面的 这个jar包是jline-2.12.jar,而hadooop的这个jar包是

<!--hive这个jar包的版本-->
[root@master lib]# ll jline-2.12.jar
-rw-rw-r--. root root Apr jline-2.12.jar <!--hadooop的这个jar包版本-->
[root@master lib]# ll /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar
-rw-rw-r--. hadoop hadoop Mar /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar
[root@master lib]#

3:解决方法,将hive的新版,替换hadoop的老版本的这个jar包即可:

完成以上操作,重新启动hive即可,完成hive的安装启动。开始学习hive.

 [root@master lib]# ll jline-2.12.jar
-rw-rw-r--. root root Apr jline-2.12.jar
[root@master lib]# ll /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar
-rw-rw-r--. hadoop hadoop Mar /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar
[root@master lib]# rm /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar
rm: remove regular file `/home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar'? y
[root@master lib]# ll /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar
ls: cannot access /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar: No such file or directory
[root@master lib]# cp jline-2.12.jar /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/
[root@master lib]# ll /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar
ls: cannot access /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-0.9..jar: No such file or directory
[root@master lib]# ll /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-2.12.jar
-rw-r--r--. root root Dec : /home/hadoop/soft/hadoop-2.6./share/hadoop/yarn/lib/jline-2.12.jar
[root@master lib]#

停更......

2017-12-10 11:11:16

上一篇:scss 初学笔记 三 继承


下一篇:JS监听浏览器的返回、后退、上一页按钮的事件方法