6 Replies Latest reply on Mar 8, 2010 3:29 PM by Anil Saldanha

    WebSSO - ClassCastException on JBoss AS 5.1

    Bernard Tison Newbie

      Hi,

       

      I'm trying to install the Web SSO examples on JBoss AS 5, using Picketlink 5.0.2., following the descriptions in the User Guide (chapter 3.1).

      I have two instances of JBoss AS, one acting as IDP, and one as SP. For the SP, I use the sales demo app, configured for POST binding.

       

      I get a ClassCastException when processing the SAML response received from the IDP.

       

      The ClassCastException is caused by the following code snippet in the org.picketlink.identity.federation.bindings.tomcat.sp.SPPostFormAuthenticator class(line 233)

       

      {code:java}

                     if((new ServerDetector()).isJboss() || jbossEnv)
                     {
                        GenericPrincipal gp = (GenericPrincipal) principal;
                        //Push a context
                        ServiceProviderSAMLContext.push(username, Arrays.asList(gp.getRoles()));
                        principal = context.getRealm().authenticate(username, password);
                        ServiceProviderSAMLContext.clear();
                     }

      {code}

       

      I am missing something?

       

      Bernard