I am new in hadoop. I am trying to run a job by toolrunner of hadoop from java code in netbeans environment. But still I can't find a solution to fix the issue.
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)
My platform is windows 7.
I’ve added many libraries. First of all I’ve added the
Apacheds-kerberos-codec-2.0.0-M15.jar
Then I added many other libraries similar
Javaee-api-7.0.jar
java-rt-jar-stubs-1.5.0.jar
…
But I don’t know from where the error arises.
This is the complete list of .jar files I added to include Keytab class in code:
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
Thanks in advance
hadoop-conf-kerberos-6.0.0.jar. However, a new error is arised as such: " java.lang.IllegalArgumentException: Can't get Kerberos realm" - e nahang