2 Replies Latest reply on Sep 6, 2005 5:25 AM by vbagiatis

    AbstractPersistetCollection local class incompatible

    jjmargon Newbie

      Hi, all.
      I'm developing an application in JBoss 4.0.2 with Hibernate 3 and Jbpm 3. Also, I have an EJB for give access to a Swing remote client.
      Also, the EJB is a BMP (I'm going to put another topic that why I've chosed BMP instead CMP, beacuse something was wrong).
      I have the next problem:
      If I call the next method of the EJB

      List getInstancesByUser(Tercero user){
      .......
      }

      I obtain the next exception:

      
      java.lang.reflect.UndeclaredThrowableException
       at $Proxy1.executeCommand(Unknown Source)
       at test.command.WorkFlowEJBTerceroCommandTest.testClientEJB(WorkFlowEJBTerceroCommandTest.java:28)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at junit.framework.TestSuite.runTest(TestSuite.java:208)
       at junit.framework.TestSuite.run(TestSuite.java:203)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
      Caused by: java.io.InvalidClassException: org.hibernate.collection.AbstractPersistentCollection; local class incompatible: stream classdesc serialVersionUID = 7663409046372276524, local class serialVersionUID = -7982170513654570219
       at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:463)
       at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
       at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
       at java.util.ArrayList.readObject(ArrayList.java:547)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
       at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
       at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:119)
       at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
       at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)No existen tramites para el tercero cuyo dni es 00000096
      
       at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
       ... 17 more
      


      Oddly, researching the code of the EJB method, the code that generates the error is:
      session.createQuery("from ProcessInstance pi order by pi.start desc").list();
      

      If I comment this line, and I create a dummy list, I don't get the error.
      Why I obtain this error?
      Any help is welcome and it's urgent.
      Thanks in advance.