Java.rmi.MarshalException

whenever I try to call my ejb from a client, I get this error:

java.rmi.MarshalException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is: java.io.InvalidClassException: com.afrikbrain.util.message.MessageInfo; local class incompatible: stream classdesc serialVersionUID = 2285009932770474121, local class serialVersionUID = -2900394430145132451 at org.jboss.remoting.transport.socket.SocketClientInvoker.handleException(SocketClientInvoker .java:122) 

Why is this happening? and how to solve it?

0
java java-ee marshalling ejb rmi
Oct. 16 '09 at 14:35
source share
2 answers

The local class and the remote class have different versions. During the unmarshalling process, the receiver does not support the sender protocol version. Make sure that the compiled class on the server is the same version of the compiled class on the client, so it can be serialized / deserialized without any problems. I suggest you rebuild the entire project from scratch and redistribute them, as well as restore the stubs.

+3
Oct. 16 '09 at 14:41
source share

It looks like your server has a different version of the object that your client has. Make sure they both use the same code for the com.afrikbrain.util.message.MessageInfo object.

+1
Oct 16 '09 at 14:42
source share



All Articles