[jboss-user] [JBoss Seam] - Re: Advice on Security System

mikepkp17 do-not-reply at jboss.com
Thu Jan 18 05:19:24 EST 2007


Thank you very much for this. I am currently testing this and I have the following issue:


  | 11:08:51,187 ERROR [[/join2learn]] Session attribute event listener threw exception
  | java.lang.ClassCastException: org.jboss.seam.security.Identity
  | 	at $javax.servlet.http.HttpSessionActivationListener$$FastClassByCGLIB$$d658c913.invoke(<generated>)
  | 	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
  | 	at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:89)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
  | 	at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
  | 	at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:29)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
  | 	at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
  | 	at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:39)
  | 	at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:31)
  | 	at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
  | 	at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
  | 	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:112)
  | 	at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:145)
  | 	at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:80)
  | 	at org.jboss.seam.security.Identity$$EnhancerByCGLIB$$dcd6fd12.sessionWillPassivate(<generated>)
  | 	at org.jboss.web.tomcat.tc5.session.ClusteredSession.passivate(ClusteredSession.java:896)
  | 	at org.jboss.web.tomcat.tc5.session.JBossCacheManager.storeSession(JBossCacheManager.java:642)
  | 	at org.jboss.web.tomcat.tc5.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:49)
  | 	at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:98)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | 	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | 	at java.lang.Thread.run(Thread.java:595)
  | 

debug.seam message for org.jboss.seam.security.identity:


  | callbacks [org.jboss.seam.intercept.JavaBeanInterceptor at 17f7411] 
  | class class org.jboss.seam.security.Identity$$EnhancerByCGLIB$$ae5bb089 
  | loggedIn false 
  | principal  
  | subject Betreff: Principal: mike Principal: roles(members:sysadmin,admin) 
  | toString() org.jboss.seam.security.Identity at 1030eda 
  | 

and my application policy:


  | 	  <application-policy name="test">
  | 	    <authentication>
  | 		    <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
  | 				<module-option name="dsJndiName">java:jdbc/users-ds</module-option>
  | 				<module-option name="principalsQuery">select Password from Principals where PrincipalID=?</module-option>
  | 				<module-option name="rolesQuery">select Role, RoleGroup from Roles where PrincipalID=?</module-option>
  | 			</login-module>
  | 		  </authentication>
  | 	  </application-policy>
  | 

It seems that the authentication process works correctly but I don't know how to find out where this classcast exception is thrown and why.

The seamspace example works correctly.

Any hints?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003210#4003210

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003210



More information about the jboss-user mailing list