2016-06-16 79 views
2

我構建了Oozie並在hdfs中創建了共享庫,但它給出了以下錯誤。 我遵循了所有的步驟,但這是唯一出錯的地方。java.lang.NoClassDefFoundError:./oozie-setup.sh sharelib create -fs hdfs:// localhost:9000

setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m" 
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/io/filefilter/IOFileFilter 
    at java.lang.Class.getDeclaredMethods0(Native Method) 
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2625) 
    at java.lang.Class.getMethod0(Class.java:2866) 
    at java.lang.Class.getMethod(Class.java:1676) 
    at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494) 
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486) 
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.filefilter.IOFileFilter 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425) 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358) 
    ... 6 more 

謝謝你的幫助。

回答

0

在extlib目錄中拷貝hadoop庫並準備戰爭然後嘗試它。

cp $HADOOP_HOME/share/hadoop/*/hadoop-*.jar./libext/

cp $HADOOP_HOME /share/hadoop/*/lib/*.jar./libext/

cp mysql-connector-java-5.1.29-bin.jarlibext/

bin/oozie-setup.sh prepare-war

運行這個副本之後,並準備。

./bin/oozie-setup.sh sharelib create -fs hdfs://IP(HOSTNAME):9000

相關問題