IllegalStateException(s) on logout
kj_newbie Mar 6, 2009 5:42 PMHi All,
I am using JBoss 5 GA on solaris 10/x86 machine.
Everytime someone logs out from a web app that is deployed in this container, we see the following exception in the shell where JBoss was started:
 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
java.lang.IllegalStateException: Security Context is null
 at org.jboss.web.tomcat.security.SecurityAssociationActions$PopRunAsRoleAction.run(SecurityAssociationActions.java:156)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.web.tomcat.security.SecurityAssociationActions.popRunAsIdentity(SecurityAssociationActions.java:302)
 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:193) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)
This is when the application is being accessed without any issues.
There is another scenario that occurs sometimes where-in, once a person logs in and out successfully, the next person who logs-in is not able to access any page - all pages display an access denied message. The exception thrown in this case is as follows:
ERROR [JBossWebRealm] Error during authenticate
 java.lang.IllegalStateException: Security Context has not been set
 at org.jboss.web.tomcat.security.SecurityAssociationActions$SetPrincipalInfoA
 ction.run(SecurityAssociationActions.java:70)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.web.tomcat.security.SecurityAssociationActions.setPrincipalInfo(
 SecurityAssociationActions.java:270)
 at org.jboss.web.tomcat.security.JBossWebRealm.authenticate(JBossWebRealm.jav
 a:388)
 at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthe
 nticator.java:258)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBa
 se.java:417)
 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.jav
 a:92)
 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(Se
 curityContextEstablishmentValve.java:126)
 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(Sec
 urityContextEstablishmentValve.java:70)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1
 27)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
 02)
 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnec
 tionValve.java:158)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja
 va:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330
 )
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ht
 tp11Protocol.java:601)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:595)
Can anybody throw some light on either / both of these cases.
Thanks
 
    