> Having followed the documentation "JAAS Based Security in JBoss", I get a > "ClassCastException" on the server during the authentication stage (no > matter whether the user logging in is authorized or not). The code seems > to be trying to cast a "SimplePrinciple" to a String. Has anyone else come > across this problem and is there a fix? > > Platform: > JBoss v2.2.0 FINAL on JDK 1.3 (JVM 1.3.0-C) on Windows NT > > > SERVER STACK TRACE > > [JAASSecurity] User 'billy' authenticated. > [TravelAgentBean] javax.security.auth.login.LoginException: > java.lang.ClassCastException: org.jboss.security.SimplePrincipal > at > org.jboss.security.plugins.samples.RolesLoginModule.commit(RolesLoginModul > e.java:74) > at java.lang.reflect.Method.invoke(Native Method) > at > javax.security.auth.login.LoginContext.invoke(LoginContext.java:595) > at > javax.security.auth.login.LoginContext.access$000(LoginContext.java:125) > at > javax.security.auth.login.LoginContext$3.run(LoginContext.java:531) > at java.security.AccessController.doPrivileged(Native Method) > at > javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528) > at > javax.security.auth.login.LoginContext.login(LoginContext.java:450) > at > org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityMa > nager.java:332) > at > org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityMa > nager.java:301) > at > org.jboss.security.plugins.JaasSecurityManager.doesUserHaveRole(JaasSecuri > tyManager.java:252) > at > org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(Securit > yInterceptor.java:225) > at > org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.j > ava:144) > at > org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106) > at > org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContain > er.java:253) > at > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPCont > ainerInvoker.java:369) > at java.lang.reflect.Method.invoke(Native Method) > at > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) > at sun.rmi.transport.Transport$1.run(Transport.java:142) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:139) > at > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java > :643) > at java.lang.Thread.run(Thread.java:484) > > [TravelAgentBean] at > javax.security.auth.login.LoginContext.login(LoginContext.java:462) > [TravelAgentBean] at > org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityMa > nager.java:332) > [TravelAgentBean] at > org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityMa > nager.java:301) > [TravelAgentBean] at > org.jboss.security.plugins.JaasSecurityManager.doesUserHaveRole(JaasSecuri > tyManager.java:252) > [TravelAgentBean] at > org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(Securit > yInterceptor.java:225) > [TravelAgentBean] at > org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.j > ava:144) > [TravelAgentBean] at > org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106) > [TravelAgentBean] at > org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContain > er.java:253) > [TravelAgentBean] at > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPCont > ainerInvoker.java:369) > [TravelAgentBean] at java.lang.reflect.Method.invoke(Native Method) > [TravelAgentBean] at > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) > [TravelAgentBean] at > sun.rmi.transport.Transport$1.run(Transport.java:142) > [TravelAgentBean] at > java.security.AccessController.doPrivileged(Native Method) > [TravelAgentBean] at > sun.rmi.transport.Transport.serviceCall(Transport.java:139) > [TravelAgentBean] at > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443) > [TravelAgentBean] at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java > :643) > [TravelAgentBean] Warning, session-roles could not perform role mapping > for: billy > [TravelAgentBean] at java.lang.Thread.run(Thread.java:484) > [TravelAgentBean] Illegal access, principal=billy method=create > > > CLIENT STACK TRACE > > java.rmi.ServerException: RemoteException occurred in server thread; > nested exception is: > java.rmi.RemoteException: checkSecurityAssociation; nested exception > is: > java.lang.SecurityException: Illegal access exception > java.rmi.RemoteException: checkSecurityAssociation; nested exception is: > java.lang.SecurityException: Illegal access exception > java.lang.SecurityException: > Illegal access exception at > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemot > eCall.java:245) at > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) > at > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unk > nown Source) > at > org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248) > at $Proxy0.create(Unknown Source) > at com.titan.travelagent.Client_1.main(Client_1.java:78) > > _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
