问题详情:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flume/tools/GetJavaProperty
Caused by: java.lang.ClassNotFoundException: org.apache.flume.tools.GetJavaProperty
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.flume.tools.GetJavaProperty. Program will exit.
问题原因:
1、jdk冲突
2、安装了hbase就会报着个错
解决方案:
1、卸载openjdk
2、安装jdk7.
3、将hbase的hbase.env.sh的一行配置注释掉
Extra Java CLASSPATH elements. Optional.
export HBASE_CLASSPATH=/home/hadoop/hbase/conf
4、或者将HBASE_CLASSPATH改为JAVA_CLASSPATH,配置如下
Extra Java CLASSPATH elements. Optional.
export JAVA_CLASSPATH=.:JAVA_HOME/lib/tools.jar
网友评论