2 Replies Latest reply on Dec 29, 2005 1:09 AM by bhanu piya

    jBPM 3.1 alpha2: Could not deserialize a Serializable variab

    Patrick TETI Newbie

      Hi,

      When I try to retrieve a stored variableInstance (variable for a processInstance or a taskInstance) whose type is ByteArrayInstance (Serializable object for example), the object can not be deserialized. It seems that the byte array retrieved from database is truncated.

      Here is the stack trace.

      java.lang.RuntimeException: couldn't deserialize object
      at org.jbpm.context.exe.converter.SerializableToByteArrayConverter.revert(SerializableToByteArrayConverter.java:38)
      at org.jbpm.context.exe.VariableInstance.getValue(VariableInstance.java:102)
      at org.jbpm.context.exe.TokenVariableMap.getVariable(TokenVariableMap.java:201)
      at org.jbpm.context.exe.TokenVariableMap.getVariable(TokenVariableMap.java:72)
      at org.jbpm.context.exe.ContextInstance.getVariable(ContextInstance.java:106)
      at org.jbpm.context.exe.ContextInstance.getVariable(ContextInstance.java:94)
      at com.db.eps.common.workflow.analysis.jbpm.Jbpm31TaskManagementTest.test_step3_startWorkingOnFixingBroker(Jbpm31TaskManagementTest.java:261)
      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:478)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: java.io.EOFException
      at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2165)
      at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:2900)
      at java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2701)
      at java.io.ObjectInputStream.readString(ObjectInputStream.java:1536)
      at java.io.ObjectInputStream.readTypeString(ObjectInputStream.java:1344)
      at java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:540)
      at java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:762)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1503)
      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.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.readObject(ObjectInputStream.java:324)
      at org.jbpm.context.exe.converter.SerializableToByteArrayConverter.revert(SerializableToByteArrayConverter.java:36)
      ... 21 more

      Any idea ?
      Thanks
      Patrick