Jerome Blanchard wrote:
java.io.InvalidClassException: org.jboss.security.auth.callback.SecurityAssociationHandler; class invalid for deserialization
Looks like an invalid jar (version) is in the client classpath.
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 :
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 220.127.116.1100911-M5 to 6.0.0.Final and before it was working like a charm...
any other idea ?
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.
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.