5 Replies Latest reply on Apr 28, 2008 1:34 AM by Jeroen Wenting

    serialVersionUID mismatch using remote client and jboss-4.0.

    Alex Levine Newbie

      Im am currently using jboss 4.0.4.CR2 and trying to get the server(jboss) to return an entity bean via a call to a session bean. When I run my test program, I can see the Entity bean being loaded on the server side, but then It fails to marshal it on the client side with the following stack trace saying that the org.hibernate.collection.AbstractPersistentCollection has a serialVersionUID mismatch:

      [java] ERROR [main][2006-04-06 16:47:59,324] - SocketClientInvoker.java(293): Got marshalling exception, exiting
      [java] java.io.InvalidClassException: org.hibernate.collection.AbstractPersistentCollection; local class incompatible: stream classdesc serialVersionUID = 7602608801868099635, local class serialVersionUID = -7982170513654570219
      [java] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
      [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
      [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
      [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
      [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      [java] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
      [java] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      [java] at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
      [java] at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      [java] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
      [java] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      [java] at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
      [java] at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
      [java] at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
      [java] at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
      [java] at org.jboss.remoting.Client.invoke(Client.java:525)
      [java] at org.jboss.remoting.Client.invoke(Client.java:488)
      [java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
      [java] at $Proxy12.loadObject(Unknown Source)
      [java] at com.squaretrade.managed.ObjectManager.loadManagedObject(ObjectManager.java:51)
      [java] at jbosstest.JBossTest.testProduct(JBossTest.java:28)
      [java] at jbosstest.JBossTest.main(JBossTest.java:20)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:196)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:133)
      [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:661)
      [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:168)
      [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:77)
      [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
      [java] at org.apache.tools.ant.Task.perform(Task.java:364)
      [java] at org.apache.tools.ant.Target.execute(Target.java:301)
      [java] at org.apache.tools.ant.Target.performTasks(Target.java:328)
      [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
      [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
      [java] at org.apache.tools.ant.Main.runBuild(Main.java:632)
      [java] at org.apache.tools.ant.Main.startAnt(Main.java:183)
      [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
      [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
      [java] java.lang.reflect.UndeclaredThrowableException
      [java] at $Proxy12.loadObject(Unknown Source)
      [java] at com.squaretrade.managed.ObjectManager.loadManagedObject(ObjectManager.java:51)
      [java] at jbosstest.JBossTest.testProduct(JBossTest.java:28)
      [java] at jbosstest.JBossTest.main(JBossTest.java:20)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:196)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:133)
      [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:661)
      [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:168)
      [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:77)
      [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
      [java] at org.apache.tools.ant.Task.perform(Task.java:364)
      [java] at org.apache.tools.ant.Target.execute(Target.java:301)
      [java] at org.apache.tools.ant.Target.performTasks(Target.java:328)
      [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
      [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
      [java] at org.apache.tools.ant.Main.runBuild(Main.java:632)
      [java] at org.apache.tools.ant.Main.startAnt(Main.java:183)
      [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
      [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
      [java] Caused by: java.rmi.MarshalException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is:
      [java] java.io.InvalidClassException: org.hibernate.collection.AbstractPersistentCollection; local class incompatible: stream classdesc serialVersionUID = 7602608801868099635, local class serialVersionUID = -7982170513654570219
      [java] at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:306)
      [java] at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
      [java] at org.jboss.remoting.Client.invoke(Client.java:525)
      [java] at org.jboss.remoting.Client.invoke(Client.java:488)
      [java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
      [java] ... 23 more
      [java] Caused by: java.io.InvalidClassException: org.hibernate.collection.AbstractPersistentCollection; local class incompatible: stream classdesc serialVersionUID = 7602608801868099635, local class serialVersionUID = -7982170513654570219
      [java] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
      [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
      [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
      [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
      [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      [java] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
      [java] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      [java] at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
      [java] at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      [java] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
      [java] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      [java] at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
      [java] at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
      [java] at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
      [java] ... 35 more



      I am using the following jars that are in the client dirctory of the jboss-4.0.4.CR2 install:

      jbossall-client.jar
      jboss-ejb3-client.jar
      jnp-client.jar
      jboss-common-client.jar
      jboss-aop-jdk50-client.jar
      jboss-aspect-jdk50-client.jar

      Should I not be including one of these and include a different one instead?? Or is there a possibility that the wrong jar was included in the distribution??


      Any help would be greatly appreciated.