2010-04-04

Hive启动报错解决方法

Posted in 云计算 at 0:04 Author:仲远

标签:

启动Hive时报错如下:

wamdm@WAMDM5:~/hive/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)

解决方法:

/home/wamdm/hadoop-original/hadoop-config/hadoop-env.sh里面被增加了HADOOP_CLASSPATH的设置,如下:

export HADOOP_CLASSPATH=$HBASE_HOME/hbase/hbase-0.20.3.jar:$HABSE_HOME/hbase-config:$ZOOKEEPER/zookeeper-3.2.2.jar

将其修改为:

export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HBASE_HOME/hbase/hbase-0.20.3.jar:$HABSE_HOME/hbase-config:$ZOOKEEPER/zookeeper-3.2.2.jar

所以增加CLASSPATH时要记得把原来的也加上,而不是覆盖,否则会造成找不到路径。

来自Cloud Project Team@WAMDM

本文可以自由转载,转载时请保留全文并注明出处:
转载自仲子说 [ http://www.wangzhongyuan.com/ ]
原文链接:

Leave a Comment

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word