Caused by: javax.security.auth.login.LoginException: unable to find LoginModule class: com.ibm.secur
2013-05-27 20:47
525 查看
首先说下出现这个错误的环境配置吧:aix小型机安装tomcat,(配有ibm专有的jdk,1.6),hadoop(1.0.4)集群,linux:redhat,jdk是oracle的1.6。出现上面的错误信息;上网查了下,发现也有相同的错误出现:http://mail-archives.apache.org/mod_mbox/hadoop-user/201208.mbox/%3COF2E935E40.56BFE6E6-ON85257A64.004BB391-85257A64.004BF20E@us.ibm.com%3E,上面说是大概意思是IBM的jdk有特殊的LoginModules,可能和hadoop的不匹配,可以看到下面的
上面红色字体的部分在ibm的jdk里面并没有发现,所以直接报错说那个LinuxLoginModule找不到,那么怎么办呢?可以考虑下把这两个类替换掉:
在ibm jdk的api中:可以看到这两个类:
直接用上面的两个类去替换前面红色部分的类就可以了。
替换完成之后要怎么做呢?
1.使用linux系统,在eclipse的java工程中导入hadoop的所有包,并把上面的文件放入src下面,直接保存;
2. 打开bin下面的文件,查找到 UserLoginInformation开头的类,使用linux系统的工具把hadoop-core-1.0.4.jar里面相应的类替换掉;
3. 把hadoop集群所有的hadoop-core-1.0.4.jar用上面得到的替换掉;
做完上面的,基本应该就ok了,这样再测试一下,看是否ok。
最后,声明一下,这个还没有经过博主测试,只是一个想法。
分享,快乐,成长
转载请注明出处:http://blog.csdn.net/fansy1990
UserGroupInformation.java中的源代码:
private static String getOSLoginModuleName() { 262 if (System.getProperty("java.vendor").contains("IBM")) { 263 return windows ? "com.ibm.security.auth.module.NTLoginModule" 264 : "com.ibm.security.auth.module.LinuxLoginModule"; 265 } else { 266 return windows ? "com.sun.security.auth.module.NTLoginModule" 267 : "com.sun.security.auth.module.UnixLoginModule"; 268 } 269 } 270
private static Class<? extends Principal> getOsPrincipalClass() { 274 ClassLoader cl = ClassLoader.getSystemClassLoader(); 275 try { 276 if (System.getProperty("java.vendor").contains("IBM")) { 277 if (windows) { 278 return (Class<? extends Principal>) 279 cl.loadClass("com.ibm.security.auth.UsernamePrincipal"); 280 } else { 281 return (Class<? extends Principal>) 282 (System.getProperty("os.arch").contains("64") 283 ? cl.loadClass("com.ibm.security.auth.UsernamePrincipal") 284 : cl.loadClass("com.ibm.security.auth.LinuxPrincipal")); 285 } 286 } else { 287 return (Class<? extends Principal>) (windows 288 ? cl.loadClass("com.sun.security.auth.NTUserPrincipal") 289 : cl.loadClass("com.sun.security.auth.UnixPrincipal")); 290 } 291 } catch (ClassNotFoundException e) { 292 LOG.error("Unable to find JAAS classes:" + e.getMessage()); 293 } 294 return null; 295 }
上面红色字体的部分在ibm的jdk里面并没有发现,所以直接报错说那个LinuxLoginModule找不到,那么怎么办呢?可以考虑下把这两个类替换掉:
在ibm jdk的api中:可以看到这两个类:
直接用上面的两个类去替换前面红色部分的类就可以了。
替换完成之后要怎么做呢?
1.使用linux系统,在eclipse的java工程中导入hadoop的所有包,并把上面的文件放入src下面,直接保存;
2. 打开bin下面的文件,查找到 UserLoginInformation开头的类,使用linux系统的工具把hadoop-core-1.0.4.jar里面相应的类替换掉;
3. 把hadoop集群所有的hadoop-core-1.0.4.jar用上面得到的替换掉;
做完上面的,基本应该就ok了,这样再测试一下,看是否ok。
最后,声明一下,这个还没有经过博主测试,只是一个想法。
分享,快乐,成长
转载请注明出处:http://blog.csdn.net/fansy1990
相关文章推荐
- livy提交任务报错com.cloudera.livy.shaded.kryo.kryo.KryoException: Unable to find class: GATest.ConJob
- Caused by: Unable to locate parent package [json-package] for [class com.you.action.ColumnAction] -
- AndroidStudio的 Caused by java.lang.ClassNotFoundException Didn't find class com.gizwits.opensource.a
- 一个异常:Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class com.rssReader.st
- 解决:ould not find a getter for porDate in class com.bc.bean.PortalSheet Caused by: org.hibernate.PropertyNotFoundException: Could
- [JPA] javax.persistence.EntityNotFoundException: Unable to find com.duona.base.bean.Business with id
- Android studio报:Caused by: java.lang.ClassNotFoundException: Didn't find class "xhs.com.view.ParentV
- java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ex.activity/com.ex.activity.LoginActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class
- Caused by: java.lang.ClassNotFoundException: Cannot find class: com.github.pagehelper.PageIntercepto
- bug--service--Caused by java.lang.SecurityException: Unable to start service Intent { }:user 0 is restricted
- Android studio报:Caused by: java.lang.ClassNotFoundException: Didn't find class "xhs.com.view.ParentV
- android.content.ActivityNotFoundException: Unable to find explicit activity class {...}; have you de
- com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method findUserByUserNo in the service wusc.edu.facade.user.service.PmsUserFacade.
- android.content.ActivityNotFoundException: Unable to find explicit activity class错误原因排查
- Dubbo服务启动时Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /19
- [JPA错误]javax.persistence.EntityNotFoundException: Unable to find xxx
- Caused by: java.lang.ClassNotFoundException: Cannot find class: net.sf.cglib.proxy.Enhancer
- 解决com.sun.tools.javac.Main is not on the classpath / Unable to find a javac compiler 的问题
- Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK(转
- java.lang.RuntimeException Unable to instantiate application Caused by: java