hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <nicolas.lale...@hibnet.org>
Subject Re: Hive installation problem: java.lang.NoSuchFieldError: type
Date Thu, 10 Nov 2011 11:44:35 GMT

Le 4 nov. 2011 à 17:19, Jian Fang a écrit :

> Hi,
> 
> I installed hive 0.7.1 to work with Hadoop 0.20.2. I have set up HADOOP_HOME and HIVE_HOME.
I tried to use the Hive shell and got the following error:
> 
> [hadoop@dnjsrcha01 hive]$ bin/hive
> Hive history file=/tmp/hadoop/hive_job_log_hadoop_201111041218_2145572589.txt
> hive> show tables;
> Exception in thread "main" java.lang.NoSuchFieldError: type
>     at org.apache.hadoop.hive.ql.parse.HiveLexer.mKW_SHOW(HiveLexer.java:1234)
>     at org.apache.hadoop.hive.ql.parse.HiveLexer.mTokens(HiveLexer.java:5942)
>     at org.antlr.runtime.Lexer.nextToken(Lexer.java:84)
>     at org.antlr.runtime.CommonTokenStream.fillBuffer(CommonTokenStream.java:95)
>     at org.antlr.runtime.CommonTokenStream.LT(CommonTokenStream.java:238)
>     at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:521)
>     at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:436)
>     at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:327)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
>     at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)
>     at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)
>     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:456)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> 
> What was wrong and how to get it working?

I don't have the same setup as you, but I got the same error. This is a classpath issue and
the version of antlr. Locally I had in my classpath antlr 3.3. Downgrading to 3.0.1 fixed
this. 3.0.1 is the version I saw in the build of the 0.7.1 tag of hive (I also saw antlr-2.7.7
is that same compile classpath, but it doesn't work either).

Hope it helps,
Nicolas


Mime
View raw message