You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by violin <52...@qq.com> on 2013/02/25 04:10:06 UTC
java serialization problem
Hi all, I got some problems using the class Serializer of ode 1.3.5. I've already generate some cbp files from deploying bpel projects in the ode engine, which is deployed in tomcat. Then I tried to read the oprocess object from the cbp files with the lib file in the ode engine, such as ode-bpel-obj-1.3.5.jar, etc. But I got problems like this:Exception in thread "main" java.lang.IllegalStateException: unread block data
at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2376)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1360)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479)
at org.apache.ode.bpel.o.OProcess.readObject(OProcess.java:201)
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:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.ode.bpel.o.Serializer.readOProcess(Serializer.java:135)
at TestJavaSerialization.main(TestJavaSerialization.java:13)
The jdk version used by ode engine and Eclipse projects are the same, and my eclipse java code is mainly like this:
Serializer cbp = new Serializer(new FileInputStream("GeoDemoProcess.cbp"));
OProcess process = cbp.readOProcess();
I just could not figure out why the second line of code met the "unread block data" problem.
Thank you.