I am connecting to two JBoss instances remotely via the RMIAdapter. One is JBoss 3.0 and one is JBoss 3.2. I am running into the following problem when talking to the remote instance:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.io.InvalidClassException: javax.management.ObjectName; local class incompatible: stream classdesc serialVersionUID = 1081892073854801359, local class serialVersionUID = 2846767152916764670
This occurs when the jmx-libraries on the server do not match the libs on the client, e.g. if I try to connect to a 3.2 instance with the jboss-jmx.jar from JBoss 3.0. When using the same libs everything works fine.
How can I tell the client (a web application) to use the 3.2 libraries? I tried to put the correct jboss-jmx.jar into WEB-INF/lib but this didn't work understandably. Or is there another way to avoid the exception?
This question has been answered a few times in the jmx forum.