0 Replies Latest reply on Mar 29, 2007 7:26 AM by Thomas Cremers

    JBoss-sso class cast exception SSOUser

    Thomas Cremers Newbie

      Hi,

      I've configured a JBoss-sso RC1 environment in jboss-4.0.5. And I'm trying to use the DemoLoginProvider with an simpel non JAAS application. I can see JBoss-sso start up fine and there are no error with deploying the application. However when I call the application and after the

      org.jboss.security.saml.SSOManager.processManualLoginNotification(request, "foo-user");


      I get an java.lang.ClassCastException: org.jboss.security.saml.SSOUser

      I checkout out the code and can see that it throws this acception when it's trying to get the SSOUser object from the session.

      Below my configuration and the complete exception.

      Thanks,

      Thomas

      I configured my sso.cfg.xml as follows

      <jboss-sso>
       <identity-management>
       <login>
       <provider id="si:jboss-sso:demo:login" class="org.jboss.security.idm.demo.DemoLoginProvider"/>
       </login>
       </identity-management>
       <sso-processor>
       <processor class="org.jboss.security.saml.JBossSingleSignOn">
       <property name="trustServer">http://host.domain.com:8080/federate/trust</property>
       </processor>
       </sso-processor>
      </jboss-sso>
      


      My server.cfg.xml

      <jboss-sso>
       <federation-server>
       <partners>
       <partner domain="lunatech.com" server="http://host.domain.com:8080/federate"/>
       </partners>
       </federation-server>
      </jboss-sso>
      


      My context.xml file in the META-INF directory of the application

      <Context>
       <Valve className="org.jboss.security.valve.PlainSSOAutoLogout" logoutURL="/app/logout"/>
       <Valve className="org.jboss.security.valve.PlainSSOTokenManager" assertingParty="appSSO"/>
       <Valve className="org.jboss.security.valve.PlainSSOAutoLogin"/>
      </Context>
      


      And the full exception I get in the server.log

      12:30:59,520 ERROR [STDERR] java.lang.ClassCastException: org.jboss.security.saml.SSOUser
      12:30:59,521 ERROR [STDERR] at org.jboss.security.valve.PlainSSOAutoLogin.invoke(PlainSSOAutoLogin.java:171)
      12:30:59,521 ERROR [STDERR] at org.jboss.security.valve.PlainSSOTokenManager.invoke(PlainSSOTokenManager.java:125)
      12:30:59,521 ERROR [STDERR] at org.jboss.security.valve.PlainSSOAutoLogout.invoke(PlainSSOAutoLogout.java:168)
      12:30:59,521 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      12:30:59,521 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      12:30:59,522 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      12:30:59,522 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      12:30:59,522 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      12:30:59,522 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      12:30:59,522 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      12:30:59,522 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      12:30:59,522 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      12:30:59,523 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      12:30:59,523 ERROR [STDERR] at java.lang.Thread.run(Thread.java:613)
      12:30:59,523 ERROR [PlainSSOAutoLogout] org.jboss.security.valve.PlainSSOAutoLogout[/ldas]
      javax.servlet.ServletException: org.jboss.security.saml.SSOUser
       at org.jboss.security.valve.PlainSSOAutoLogin.invoke(PlainSSOAutoLogin.java:188)
       at org.jboss.security.valve.PlainSSOTokenManager.invoke(PlainSSOTokenManager.java:125)
       at org.jboss.security.valve.PlainSSOAutoLogout.invoke(PlainSSOAutoLogout.java:168)
       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:613)
      12:30:59,525 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
      javax.servlet.ServletException: org.jboss.security.saml.SSOUser
       at org.jboss.security.valve.PlainSSOAutoLogout.invoke(PlainSSOAutoLogout.java:174)
       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:613)
      12:30:59,540 ERROR [STDERR] java.lang.ClassCastException: org.jboss.security.saml.SSOUser
      12:30:59,541 ERROR [STDERR] at org.jboss.security.valve.PlainSSOAutoLogin.invoke(PlainSSOAutoLogin.java:171)
      12:30:59,541 ERROR [STDERR] at org.jboss.security.valve.PlainSSOTokenManager.invoke(PlainSSOTokenManager.java:125)
      12:30:59,541 ERROR [STDERR] at org.jboss.security.valve.PlainSSOAutoLogout.invoke(PlainSSOAutoLogout.java:168)
      12:30:59,541 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      12:30:59,541 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      12:30:59,541 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      12:30:59,541 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      12:30:59,542 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      12:30:59,542 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      12:30:59,542 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      12:30:59,542 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      12:30:59,542 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      12:30:59,542 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      12:30:59,542 ERROR [STDERR] at java.lang.Thread.run(Thread.java:613)
      12:30:59,542 ERROR [PlainSSOAutoLogout] org.jboss.security.valve.PlainSSOAutoLogout[/ldas]
      javax.servlet.ServletException: org.jboss.security.saml.SSOUser
       at org.jboss.security.valve.PlainSSOAutoLogin.invoke(PlainSSOAutoLogin.java:188)
       at org.jboss.security.valve.PlainSSOTokenManager.invoke(PlainSSOTokenManager.java:125)
       at org.jboss.security.valve.PlainSSOAutoLogout.invoke(PlainSSOAutoLogout.java:168)
       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:613)
      12:30:59,543 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
      javax.servlet.ServletException: org.jboss.security.saml.SSOUser
       at org.jboss.security.valve.PlainSSOAutoLogout.invoke(PlainSSOAutoLogout.java:174)
       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:613)