java.lang.NoClassDefFoundError:./ oozie-setup.sh sharelib create -fs hdfs:// localhost:9000

时间:2016-06-16 07:35:59

标签: java hadoop hdfs oozie

我构建了Oozie并在hdfs中创建了共享库,但是它给出了以下错误。 我遵循了所有步骤,但这是唯一出错的。

 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

谢谢你的帮助。

1 个答案:

答案 0 :(得分:0)

在extlib目录中复制hadoop libs并准备战争然后尝试。

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