版本信息:

$ ./hbase version
13/05/27 09:06:00 INFO util.VersionInfo: HBase 0.92.2
13/05/27 09:06:00 INFO util.VersionInfo: Subversion https://svn.apache.org/repos
/asf/hbase/branches/0.92 -r 1379292
13/05/27 09:06:00 INFO util.VersionInfo: Compiled by jenkins on Fri Aug 31 13:13
:53 UTC 2012


报错信息:

java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException

Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.hadoop.hbase.master.HMaster.  Program will exit.

Exception in thread "main" 


这个错误的解决办法是,修改hbase-env.sh配置文件,添加如下内容:

export HBASE_CLASSPATH=/home/Administrator/hbase/lib/


问题解决!

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐