Hi Massoud,

This is not expected.

Are you setting HADOOP_CLASSPATH in hadoop-env.sh?
If you set it, I think it should be
"HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:additional_path" so that it does not
erase existing HADOOP_CLASSPATH set by Hive.

Can you post your hadoop-env.sh?

Zheng

On Mon, Nov 9, 2009 at 8:34 AM, Massoud Mazar <[email protected]> wrote:

> 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
>



-- 
Yours,
Zheng

Reply via email to