[jboss-user] [Security & JAAS/JBoss] - Re: forms authentication class cast exception

Lauri do-not-reply at jboss.com
Fri Apr 25 10:33:05 EDT 2008


Almost a year have passed since question, but anyway its worth to answer.

If you're getting error like this

  | 15:28:38,314 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
  | java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to org.jboss.security.SubjectSecurityManager
  |         at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:488)
  |         at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  |         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:157)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
  |         at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
  |         at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
  |         at java.lang.Thread.run(Thread.java:619)
  | 
Check jboss-web.xml of your .war

Probably it contain

  |   <security-domain flushOnSessionInvalidation="false"/>
  | 
Consider commenting it out

  | <!--
  |   <security-domain flushOnSessionInvalidation="false"/>
  | -->
  | 

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

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



More information about the jboss-user mailing list