简体   繁体   English

NoClassDefFoundError:org / apache / hadoop / conf / Configuration

[英]NoClassDefFoundError: org/apache/hadoop/conf/Configuration

I am trying to install oozie and getting this error.I have hadoop 2.7.1, maven 3.3.3 .Any suggestion on this? 我正在尝试安装oozie并收到此错误。我有hadoop 2.7.1,maven 3.3.3。对此有何建议?

huseyin@ubuntu:~$ '/usr/local/oozie/oozie/Oozie/oozie-4.3.0-SNAPSHOT/bin/oozie-setup.sh' sharelib create -fs hdfs://hadoopcluster:10000 setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m" huseyin @ ubuntu:〜$'/usr/local/oozie/oozie/Oozie/oozie-4.3.0-SNAPSHOT/bin/oozie-setup.sh'sharelib create -fs hdfs:// hadoopcluster:10000 setting CATALINA_OPTS =“$ CATALINA_OPTS -Xmx1024m“

Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more 错误:发生了JNI错误,请检查您的安装并再次尝试线程“main”中的异常java.lang.NoClassDefFoundError:org / apache / hadoop / conf / java中java.lang.Class.getDeclaredMethods0(Native Method)的配置.lang.Class.privateGetDeclaredMethods(Class.java:2701),位于java.lang.Class的java.lang.Class.etMethod0(Class.java:3018)的java.lang.Class.privateGetMethodRecursive(Class.java:3048)。 getMethod(Class.java:1784)at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)引起:java.lang.ClassNotFoundException:org.apache java.dedoop.conf.Configuration at java.net.URLClassLoader.findClass(URLClassLoader.java:381)at java.lang.ClassLoader.loadClass(ClassLoader.java:424)at sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java) :331)在java.lang.ClassLoader.loadClass(ClassLoader.java:357)... 7更多

You need to add all the needed jars for oozie to a new folder in your working directory (oozie-4.3.0-SNAPSHOT) called libext , please check the following paragraph from oozie docs 您需要将oozie所需的所有罐子添加到工作目录(oozie-4.3.0-SNAPSHOT)中名为libext的新文件夹中,请查看oozie docs中的以下段落

By default, oozie war will not contain hadoop and hcatalog libraries, however they are required for oozie to work. 默认情况下,oozie war不会包含hadoop和hcatalog库,但是oozie需要它们才能工作。

There are 2 options to add these libraries: 添加这些库有两个选项:

  1. At install time, copy the hadoop and hcatalog libraries to libext and run oozie-setup.sh to setup oozie war. 在安装时,将hadoop和hcatalog库复制到libext并运行oozie-setup.sh来设置oozie war。

  2. Build with -Puber which will bundle the required libraries in the oozie war. 使用-Puber构建,它将在oozie战争中捆绑所需的库。

so to solve the problem you need to : 所以要解决你需要的问题:

1- Create a libext/ directory in the directory where Oozie was expanded. 1-在扩展Oozie的目录中创建一个libext /目录。

2- If using the ExtJS library copy the ZIP file to the libext/ directory. 2-如果使用ExtJS库将ZIP文件复制到libext /目录。

3- If hadoop and hcatalog libraries are not already included in the war, add the corresponding libraries to libext/ directory. 3-如果战争中尚未包含hadoop和hcatalog库,请将相应的库添加到libext /目录中。 (In your case ) , you can just copy all the jars from your hadoop project project to the libext folder. (在您的情况下),您可以将hadoop项目项目中的所有jar复制到libext文件夹。

Important Note : the versions of the jars inside the libext folder should match the versions of those installed during the build process. 重要说明 :libext文件夹中的jar版本应与构建过程中安装的版本相匹配。

You can find the versions of the ones downloaded in the pom file you used during the build process. 您可以在构建过程中使用的pom文件中找到下载的版本。

cp  $HADOOP_HOME/share/hadoop/**/*.jar libext/
cp  $HADOOP_HOME/share/hadoop/common/*.jar libext/
cp  $HADOOP_HOME/share/hadoop/common/lib/*.jar libext/
cp  $HADOOP_HOME/share/hadoop/hdfs/lib/*.jar libext/ 
cp  $HADOOP_HOME/share/hadoop/hdfs/*.jar libext/
cp  $HADOOP_HOME/share/hadoop/mapreduce/*.jar libext/
cp  $HADOOP_HOME/share/hadoop/mapreduce/lib/*.jar libext/
cp  $HADOOP_HOME/share/hadoop/yarn/lib/*.jar libext/
cp  $HADOOP_HOME/share/hadoop/yarn/*.jar libext/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.lang.NoClassDefFoundError:org / apache / hadoop / conf / Configuration - java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration 解决org.apache.hadoop.conf.Configuration时出错 - error in resolving org.apache.hadoop.conf.Configuration org.apache.hadoop.conf.Configuration loadResource错误 - org.apache.hadoop.conf.Configuration loadResource error java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration - java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration NoSuchMethodError: org.apache.hadoop.conf.Configuration.getPassword - NoSuchMethodError: org.apache.hadoop.conf.Configuration.getPassword Spring Hadoop配置-没有类型为org.apache.hadoop.conf.Configuration的合格Bean - Spring Hadoop config - No qualifying bean of type org.apache.hadoop.conf.Configuration 如何通过org.apache.hadoop.conf.Configuration类在Java客户端中设置hadoop复制? - How to set hadoop replication in java client by class org.apache.hadoop.conf.Configuration? org.apache.hadoop.conf.Configuration.getLocalpath(Configuration)处的java.lang.NullPointerException - java.lang.NullPointerException at org.apache.hadoop.conf.Configuration.getLocalpath(Configuration) ClassNotFoundException: org.apache.hadoop.conf.Configuration 启动 Flink SQL 客户端 - ClassNotFoundException: org.apache.hadoop.conf.Configuration Starting Flink SQL Client 如何解决 java.lang.NoSuchMethodError: org.apache.hadoop.conf.Configuration.getPassword? - How to resolve java.lang.NoSuchMethodError: org.apache.hadoop.conf.Configuration.getPassword?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM