专栏首页别先生[ERROR] Terminal initialization failed; falling back to unsupported java.lang.IncompatibleClassChang

[ERROR] Terminal initialization failed; falling back to unsupported java.lang.IncompatibleClassChang

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

 1 [root@master bin]# ./hive
 2 
 3 Logging initialized using configuration in jar:file:/home/hadoop/soft/apache-hive-1.2.1-bin/lib/hive-common-1.2.1.jar!/hive-log4j.properties
 4 [ERROR] Terminal initialization failed; falling back to unsupported
 5 java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
 6     at jline.TerminalFactory.create(TerminalFactory.java:101)
 7     at jline.TerminalFactory.get(TerminalFactory.java:158)
 8     at jline.console.ConsoleReader.<init>(ConsoleReader.java:229)
 9     at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
10     at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
11     at org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader(CliDriver.java:787)
12     at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:721)
13     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
14     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
15     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
17     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
18     at java.lang.reflect.Method.invoke(Method.java:606)
19     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
20     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
21 
22 Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
23     at jline.console.ConsoleReader.<init>(ConsoleReader.java:230)
24     at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
25     at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
26     at org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader(CliDriver.java:787)
27     at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:721)
28     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
29     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
30     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
31     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
32     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
33     at java.lang.reflect.Method.invoke(Method.java:606)
34     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
35     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
36 [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--. 1 root root 213854 Apr 29  2015 jline-2.12.jar

<!--hadooop的这个jar包版本-->
[root@master lib]# ll /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar
-rw-rw-r--. 1 hadoop hadoop 87325 Mar  7  2016 /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar
[root@master lib]#

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

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

 1 [root@master lib]# ll jline-2.12.jar 
 2 -rw-rw-r--. 1 root root 213854 Apr 29  2015 jline-2.12.jar
 3 [root@master lib]# ll /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar 
 4 -rw-rw-r--. 1 hadoop hadoop 87325 Mar  7  2016 /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar
 5 [root@master lib]# rm /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar 
 6 rm: remove regular file `/home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar'? y
 7 [root@master lib]# ll /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar 
 8 ls: cannot access /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar: No such file or directory
 9 [root@master lib]# cp jline-2.12.jar /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/
10 [root@master lib]# ll /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar 
11 ls: cannot access /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-0.9.94.jar: No such file or directory
12 [root@master lib]# ll /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-2.12.jar 
13 -rw-r--r--. 1 root root 213854 Dec  9 19:10 /home/hadoop/soft/hadoop-2.6.4/share/hadoop/yarn/lib/jline-2.12.jar
14 [root@master lib]# 

停更......

2017-12-10 11:11:16

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 日志采集框架Flume以及Flume的安装部署(一个分布式、可靠、和高可用的海量日志采集、聚合和传输的系统)

    Flume支持众多的source和sink类型,详细手册可参考官方文档,更多source和sink组件 http://flume.apache.org/Flu...

    别先生
  • Hadoop数据分析平台项目实战(基于CDH版本集群部署与安装)

    1、Hadoop的主要应用场景:   a、数据分析平台。   b、推荐系统。   c、业务系统的底层存储系统。   d、业务监控系统。 2、开发环境:Linux...

    别先生
  • 一脸懵逼学习Hadoop分布式集群HA模式部署(七台机器跑集群)

    1)集群规划: 主机名          IP      安装的软件                      运行的进程 master    192.168...

    别先生
  • hadoop-What-How-Why

    The Apache Hadoop software library is a framework that allows for the distr...

    字母哥博客
  • MapReduce学习笔记

    wordcount: 统计文件中每个单词出现的次数需求:1) 文件内容小:shell2)文件内容很大:TB GB ??? 如何解决大数据量的统计分析==> ur...

    Meet相识
  • HDFS的Shell操作(开发重点)

    bin/hadoop fs 具体命令 OR bin/hdfs dfs 具体命令 dfs是fs的实现类。

    用户7656790
  • hadoop分布式集群搭建

    程序员同行者
  • YARN调试过程中的常见问题

    hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.0.jar wordcount ...

    瑾诺学长
  • /tmp/hadoop-hadoop-namenode.pid: Permission denied

    starting namenode, logging to /home/hadoop/hadoop-1.0.2/libexec/../logs/hadoo...

    闵开慧
  • 教你玩转Hadoop分布式集群搭建,进击大数据

    终于要开始玩大数据了,之前对haoop生态几乎没有太多的了解,现在赶鸭子上架,需要完全使用它来做数据中心,这是我的haoop第一篇文章,以后估计会写很多大数据相...

    用户1263954

扫码关注云+社区

领取腾讯云代金券