美文网首页
flume找不到或无法加载主类 org.apache.flume

flume找不到或无法加载主类 org.apache.flume

作者: 雨中星辰0 | 来源:发表于2018-12-01 08:16 被阅读0次

    问题详情:

    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/dt.jar:JAVA_HOME/lib/tools.jar

    相关文章

      网友评论

          本文标题:flume找不到或无法加载主类 org.apache.flume

          本文链接:https://www.haomeiwen.com/subject/tlrlcqtx.html