4 Replies Latest reply on Jan 5, 2011 7:40 AM by Jérôme Blanchard

    Problem during session bean calls since migration to JBoss 6 Final

    Jérôme Blanchard Newbie

      I encounter problem calling SessionBean since I perform migration to JBoss 6 Final.

      I have a session bean with Security Domain and I encounter marshalling exception on SecurityAssociationHandler class.

      I'm able to lookup my remote session bean interface and get a reference on it but as soon as I try to make a call, I encounter this exception ;

       

      java.io.InvalidClassException: org.jboss.security.auth.callback.SecurityAssociationHandler; class invalid for deserialization

       

      I don't understand how it's possible... The same code was working in JBoss 6 M5.

      My project is using maven and all dependencies are set up on JBoss 6 Final including client side reference to artefact : jboss-as-client 6.0.0.Final

       

      Is somebody encounter the same problem or is it a configuration problem ?

       

      Best regards, jérôme.

        • 1. Re: Problem during session bean calls since migration to JBoss 6 Final
          jaikiran pai Master

          Jerome Blanchard wrote:

           

          but as soon as I try to make a call, I encounter this exception ;

           

          java.io.InvalidClassException: org.jboss.security.auth.callback.SecurityAssociationHandler; class invalid for deserialization

           

          Looks like an invalid jar (version) is in the client classpath.

          • 2. Re: Problem during session bean calls since migration to JBoss 6 Final
            Jérôme Blanchard Newbie

            That's what I thought, so I have checked this but as I'm using maven, jars are directly recovered from repository and this is the same version in the client than in the server...

            I have compared JBOSS_HOME/client/jbosssx-client.jar!/org/jboss/security/auth/callback/SecurityAssociationHandler.class which is 1Ko and dated 22 september 2010 16h40

            to ~/.m2/repository/org/picketbox/jbosssx-client/3.0.0.CR2/jbosssx-client-3.0.0.CR2.jar!/org/jboss/security/auth/callback/SecurityAssociationHandler.class and this is the same size and date ; a diff gives nothing so it seems to be the same file.

             

            The maven artefact used in my client is :

            <dependency>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-as-client</artifactId>
                    <version>6.0.0.Final</version>
                    <type>pom</type>
                    <scope>test</scope>

            </dependency>

             

            I'm going to check the classpath generated by maven while running tests in order to try to detect another version of this class but what I don't understand is that i have juste change the dependency version from 6.0.0.20100911-M5 to 6.0.0.Final and before it was working like a charm...

             

            any other idea ?

            • 3. Re: Problem during session bean calls since migration to JBoss 6 Final
              jaikiran pai Master

              I kind of remember running into something similar while working on some project. This is what I had done at that time:

               

              <dependency>
                                  <groupId>org.jboss.jbossas</groupId>
                                  <artifactId>jboss-as-client</artifactId>
                                  <version>6.0.0-SNAPSHOT</version>
                                  <scope>runtime</scope>
                                  <type>pom</type>
                                  <exclusions>
                                      <exclusion>
                                          <groupId>org.jboss.security</groupId>
                                          <artifactId>jbosssx-client</artifactId>
                                      </exclusion>
                                      <exclusion>
                                          <groupId>org.jboss.security</groupId>
                                          <artifactId>jbosssx</artifactId>
                                      </exclusion>
                                      
                                  </exclusions>
                              </dependency>
                              
                              <dependency>
                                  <groupId>org.picketbox</groupId>
                                  <artifactId>jbosssx-client</artifactId>
                                  <version>3.0.0.CR2</version>
                                  <scope>runtime</scope>
                                  
                              </dependency>

               

              Note that I have excluded the jbosssx-client and jbosssx from being pulled in from jboss-as-client and instead added an explicit dependency on picketbox. (replace the SNAPSHOT reference with the appropriate Final version and also check what version of picketbox is shipped in 6.0 Final). At that time I did not have the time to dig into this deeper.

              • 4. Re: Problem during session bean calls since migration to JBoss 6 Final
                Jérôme Blanchard Newbie

                Ok the exclusion works fine (no more unmarshal problem).... even if I don't include the dependency to jbosssx-client from org.picketbox group...

                It seems there is an overlap of some dependency in my project... nor in the jboss 6 Final maven hierarchy.

                 

                Something strange is that even if I follow dependency tree from jboss-as-parent via jboss-as-security to jbosssx-client I don't find anywhere the version of jbosssx specified (3.0.0.CR2).

                 

                Thanks a lot for the tip.

                 

                Best regards, jérôme.