我是hadoop中的新成员。我试图在NetBeans环境中通过java代码中的hadoop工具运行器来运行一个工作。但是我仍然无法找到解决问题的解决方案。java.lang.NoClassDefFoundError:javax/security/auth/kerberos/KeyTab
Exception in thread "main" java.lang.NoClassDefFoundError: javax/security/auth/kerberos/KeyTab at org.apache.hadoop.security.UserGroupInformation.(UserGroupInformation.java:609) at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:799) at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:760) at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:633) at org.apache.hadoop.fs.FileSystem$Cache$Key.(FileSystem.java:2812) at org.apache.hadoop.fs.FileSystem$Cache$Key.(FileSystem.java:2802) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2668) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:371) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:170) at org.enahang.mapreduce.utils.mrUtils.Test.run(Test.java:125) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.enahang.mapreduce.utils.mrUtils.Test.main(Test.java:62)
我的平台是Windows 7
我已经添加了许多图书馆。首先,我已经添加了 Apacheds-kerberos-codec-2.0.0-M15.jar
后来我加入了类似 Javaee-api-7.0.jar
java-rt-jar-stubs-1.5.0.jar
... 其他许多库,但我不从哪里出现的错误认识。
这是我加入到包括代码密钥表类的.jar文件的完整列表: apacheds-i18n-2.0.0-M15.jar
api-asn1-api-1.0.0-M20.jar
api-util-1.0.0-M20.jar
commons-cli-1.2.jar
commons-codec-1.4.jar
commons-collections-3.2.1.jar
commons-configuration-1.6.jar
jsp-api-2.1.jar
hadoop-auth-2.7.0.jar
在此先感谢
在得到这个错误之前,我的hadoop核心是hadoop-core-1.2.1.jar。但是由于win 7中读/写权限错误,以及有关使用hadoop-0.20.2-core.jar的提示,我删除了第一个jar,然后我添加了第二个jar –
我想,我解决了这个问题加入'hadoop-conf-kerberos-6.0.0.jar'。但是,出现了一个新的错误:“java.lang.IllegalArgumentException:无法获得Kerberos领域” –