ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

java – NoClassDefFoundError:org / apache / hadoop / conf / Configuration

2019-07-02 16:50:41  阅读:394  来源: 互联网

标签:java noclassdeffounderror oozie


我正在尝试安装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”

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

解决方法:

您需要将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.

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.

  2. Build with -Puber which will bundle the required libraries in the oozie war.

所以要解决你需要的问题:

1-在扩展Oozie的目录中创建一个libext /目录.

2-如果使用ExtJS库将ZIP文件复制到libext /目录.

3-如果战争中尚未包含hadoop和hcatalog库,请将相应的库添加到libext /目录中. (在您的情况下),您可以将hadoop项目项目中的所有jar复制到libext文件夹.

重要说明:libext文件夹中的jar版本应与构建过程中安装的版本相匹配.

您可以在构建过程中使用的pom文件中找到下载的版本.

标签:java,noclassdeffounderror,oozie
来源: https://codeday.me/bug/20190702/1358231.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有