[
https://issues.apache.org/jira/browse/HADOOP-6941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262563#comment-13262563
]
John Lewis commented on HADOOP-6941:
------------------------------------
I ask the above question initially I was getting the following error when
executing code against IBM JRE 1.7.0:
because I am currently getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
com.sun.security.auth.UnixPrincipal
at
org.apache.hadoop.security.UserGroupInformation.<clinit>(UserGroupInformation.java:259)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:228)
at
org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1494)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1395)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:123)
at
org.apache.hadoop.mapred.JobConf.getWorkingDirectory(JobConf.java:542)
at
org.apache.hadoop.mapred.FileOutputFormat.setOutputPath(FileOutputFormat.java:135)
at
com.gce.mapreduce.dataimport.hbase.HBaseImportable.configureOutput(Unknown
Source)
at com.gce.mapreduce.dataimport.Main.configureOutput(Unknown Source)
at com.gce.mapreduce.dataimport.Main.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sun.security.auth.UnixPrincipal
at java.net.URLClassLoader.findClass(URLClassLoader.java:588)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:711)
at java.lang.ClassLoader.loadClass(ClassLoader.java:679)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:313)
at java.lang.ClassLoader.loadClass(ClassLoader.java:658)
... 12 more
After searching online, we were able to resolve this issue by include the
rt.jar. Now we are getting the following error:
Exception in thread "main" java.lang.RuntimeException: java.io.IOException:
failure to login
at
org.apache.hadoop.mapred.JobConf.getWorkingDirectory(JobConf.java:546)
at
org.apache.hadoop.mapred.FileOutputFormat.setOutputPath(FileOutputFormat.java:135)
at
com.gce.mapreduce.dataimport.hbase.HBaseImportable.configureOutput(Unknown
Source)
at com.gce.mapreduce.dataimport.Main.configureOutput(Unknown Source)
at com.gce.mapreduce.dataimport.Main.main(Unknown Source)
Caused by: java.io.IOException: failure to login
at
org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:452)
at
org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:414)
at
org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1494)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1395)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:123)
at
org.apache.hadoop.mapred.JobConf.getWorkingDirectory(JobConf.java:542)
... 4 more
Caused by: javax.security.auth.login.LoginException:
java.lang.UnsatisfiedLinkError: jaas_unix (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1165)
at
java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1129)
at java.lang.System.loadLibrary(System.java:491)
at com.sun.security.auth.module.UnixSystem.<init>(UnixSystem.java:33)
at
com.sun.security.auth.module.UnixLoginModule.login(UnixLoginModule.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:602)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:796)
at
javax.security.auth.login.LoginContext.access$000(LoginContext.java:211)
at javax.security.auth.login.LoginContext$5.run(LoginContext.java:733)
at javax.security.auth.login.LoginContext$5.run(LoginContext.java:731)
at
java.security.AccessController.doPrivileged(AccessController.java:288)
at
javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:730)
at javax.security.auth.login.LoginContext.login(LoginContext.java:600)
at
org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:433)
at
org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:414)
at
org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1494)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1395)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:123)
at
org.apache.hadoop.mapred.JobConf.getWorkingDirectory(JobConf.java:542)
at
org.apache.hadoop.mapred.FileOutputFormat.setOutputPath(FileOutputFormat.java:135)
at
com.gce.mapreduce.dataimport.hbase.HBaseImportable.configureOutput(Unknown
Source)
at com.gce.mapreduce.dataimport.Main.configureOutput(Unknown Source)
at com.gce.mapreduce.dataimport.Main.main(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:899)
at
javax.security.auth.login.LoginContext.access$000(LoginContext.java:211)
at javax.security.auth.login.LoginContext$5.run(LoginContext.java:733)
at javax.security.auth.login.LoginContext$5.run(LoginContext.java:731)
at
java.security.AccessController.doPrivileged(AccessController.java:288)
at
javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:730)
at javax.security.auth.login.LoginContext.login(LoginContext.java:600)
at
org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:433)
... 10 more
After reading this issue we believe that this might resolve our issue. So we
applied the 6941-branch1.patch successfully but we are still getting the same
issue. Reading I noticed that this patch was tested successfully on IBM JRE
1.6.0. I was wondering if there are any other steps that I should take to
resolve my issue? My cluster is currently using Hadoop v1.0.2 and HBase
v0.92.1. Any advice would be very much appreciated.
> Support non-SUN JREs in UserGroupInformation
> --------------------------------------------
>
> Key: HADOOP-6941
> URL: https://issues.apache.org/jira/browse/HADOOP-6941
> Project: Hadoop Common
> Issue Type: Bug
> Environment: SLES 11, Apache Harmony 6 and SLES 11, IBM Java 6
> Reporter: Stephen Watt
> Assignee: Devaraj Das
> Fix For: 1.0.3, 2.0.0
>
> Attachments: 6941-1.patch, 6941-branch1.patch, HADOOP-6941.patch,
> hadoop-6941.patch
>
>
> Attempting to format the namenode or attempting to start Hadoop using Apache
> Harmony or the IBM Java JREs results in the following exception:
> 10/09/07 16:35:05 ERROR namenode.NameNode: java.lang.NoClassDefFoundError:
> com.sun.security.auth.UnixPrincipal
> at
> org.apache.hadoop.security.UserGroupInformation.<clinit>(UserGroupInformation.java:223)
> at java.lang.J9VMInternals.initializeImpl(Native Method)
> at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.setConfigurationParameters(FSNamesystem.java:420)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:391)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1240)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1348)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1368)
> Caused by: java.lang.ClassNotFoundException:
> com.sun.security.auth.UnixPrincipal
> at java.net.URLClassLoader.findClass(URLClassLoader.java:421)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:652)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
> ... 8 more
> This is a negative regression as previous versions of Hadoop worked with
> these JREs
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira