Mund
Mund

Reputation: 11

ERROR running HIVE at LINUX COMMAND LINE.. java version = 1.7, HADOOP 2.3.0, Apache HIVE 1.1.0

root@hadoop:~# hive
Logging initialized using configuration in jar:file:/usr/lib/hive/apache-hive-1.1.0-bin/lib/hive-common-1.1.0.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:101)
        at jline.TerminalFactory.get(TerminalFactory.java:158)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:229)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
        at org.apache.hadoop.hive.cli.CliDriver.getConsoleReader(CliDriver.java:773)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:715)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:230)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
        at org.apache.hadoop.hive.cli.CliDriver.getConsoleReader(CliDriver.java:773)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:715)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

Upvotes: 0

Views: 4440

Answers (3)

dilshad
dilshad

Reputation: 754

I had the same problem and got it working from this link:

https://cwiki.apache.org/confluence/display/Hive/Hive+on+Spark%3A+Getting+Started

Hive has upgraded to Jline2 but jline 0.9x exists in the Hadoop lib. So you should follow these steps:

Delete jline from the Hadoop lib directory (it's only pulled in transitively from ZooKeeper). export HADOOP_USER_CLASSPATH_FIRST=true

Upvotes: 0

Shibashis
Shibashis

Reputation: 8401

Yes the above suggestion solves the problem. But I ran into problems when running pig & hive from the same instance.

I removed jline-0.9.94.jar from $HADOOP_HOME/share/hadoop/yarn/lib.

Now I am able to run both.

Upvotes: 0

twins
twins

Reputation: 61

You should init the hadoop libary:

  1. vi ~/.bashrc
  2. add export HADOOP_USER_CLASSPATH_FIRST=true into the bashrc
  3. source .bashrc
  4. hive

OK, Bingo!

Upvotes: 6

Related Questions