0 Replies Latest reply on Jan 31, 2009 9:35 AM by Rachakonda Nagarjuna

    Illeagal state exception : security context has not been set

    Rachakonda Nagarjuna Newbie

      I Deployed my sample application in JBoss and successfully accessed all the resources. But when a particular user is authenticated for the second time , i'm getting the above stated exception in the server logs.
      This is only happeningwith JBoss 5.0 . With JBoss 4.0 and 4.2 its working fine. If anybody has some clues about it , Pls help me
      here is the exception stack :


      22:42:25,828 ERROR [JBossWebRealm] Error during authenticate
      java.lang.IllegalStateException: Security Context has not been set
      at org.jboss.web.tomcat.security.SecurityAssociationActions$SetPrincipal
      InfoAction.run(SecurityAssociationActions.java:70)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.web.tomcat.security.SecurityAssociationActions.setPrincipal
      Info(SecurityAssociationActions.java:270)
      at org.jboss.web.tomcat.security.JBossWebRealm.authenticate(JBossWebReal
      m.java:388)
      at org.apache.catalina.authenticator.FormAuthenticator.authenticate(Form
      Authenticator.java:258)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
      torBase.java:417)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
      ss(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
      e(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
      onnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :828)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:601)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
      7)
      at java.lang.Thread.run(Thread.java:595)
      22:42:26,093 ERROR [JBossWebRealm] Error during authenticate
      java.lang.IllegalStateException: Security Context has not been set
      at org.jboss.web.tomcat.security.SecurityAssociationActions$SetPrincipal
      InfoAction.run(SecurityAssociationActions.java:70)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.web.tomcat.security.SecurityAssociationActions.setPrincipal
      Info(SecurityAssociationActions.java:270)
      at org.jboss.web.tomcat.security.JBossWebRealm.authenticate(JBossWebReal
      m.java:388)
      at org.apache.catalina.authenticator.FormAuthenticator.authenticate(Form
      Authenticator.java:258)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
      torBase.java:417)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
      ss(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
      e(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
      onnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :828)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:601)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
      7)
      at java.lang.Thread.run(Thread.java:595)