Just wanted to thank everyone who provided guidance to help me with my hive 
issue. In case others have the same problem, it was a HADOOP_CLASSPATH issue.

I cleaned up everything hive related and started from scratch.
(I did the following on master node of my 2 node hadoop 0.20.1 cluster, running 
on ubuntu 9.04)

$ svn co http://svn.apache.org/repos/asf/hadoop/hive/trunk hive
$ cd hive
$ ant -Dhadoop.version="0.20.0" package
$ ant test -Dtestcase=TestCliDriver -Dqfile=create_1.q
BUILD SUCCESSFUL
$ cd build/dist
$ bin/hive
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/hadoop/hive/conf/HiveConf
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
Caused by: java.lang.ClassNotFoundException: 
org.apache.hadoop.hive.conf.HiveConf
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 3 more

What fixed my problem was to edit hadoop-env.sh and add most of the jars in 
hive/lib to the end of HADOOP_CLASSPATH.
Then I was able to run bin/hive.

Thanks all.
Massoud Mazar

Reply via email to