B
babz
Hi everyone,
I am using eclipse IDE and i have two different projects A and B. I
serialize an object that belongs to project B and deserialize it later.
But I am doing this serialization/deserilization in project A.
I have two ways in project A to use the classes of project B.
OPTION 1: create a jar file of classes of project B and add it as an
external jar to project A.
OPTION 2: add project B to the build path of project A. (In this way i
have an access to the source code of project B as well. So changing
something in project B will not require me to create its jar file again
and refresh project A).
Then I have another application, call it C, that uses the jar files of
projects A and B. If I use option 1 and then create project A's jar and
project B's jar and give it to the application C, the
serialization/deserialization works. but if i use option 2 in eclipse
and build the respective jar files and try running the application with
these jar files, I get the following exception:
java.io.InvalidClassException:
com.cambridgedocs.jpdf.pdo.fonts.PdoTrueTypeFont; local class
incompatible: stream classdesc serialVersionUID = -3611946473283033478,
local class serialVersionUID = 387207963493818039
at java.ibjectStreamClass.initNonProxy(ObjectStreamClass.java:463)
at
java.ibjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
at
java.ibjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at
java.ibjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at java.ibjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.ibjectInputStream.readObject(ObjectInputStream.java:324)
at
I want it to run it successfully through both ways
Can someone help??
Thanks,
Babz
I am using eclipse IDE and i have two different projects A and B. I
serialize an object that belongs to project B and deserialize it later.
But I am doing this serialization/deserilization in project A.
I have two ways in project A to use the classes of project B.
OPTION 1: create a jar file of classes of project B and add it as an
external jar to project A.
OPTION 2: add project B to the build path of project A. (In this way i
have an access to the source code of project B as well. So changing
something in project B will not require me to create its jar file again
and refresh project A).
Then I have another application, call it C, that uses the jar files of
projects A and B. If I use option 1 and then create project A's jar and
project B's jar and give it to the application C, the
serialization/deserialization works. but if i use option 2 in eclipse
and build the respective jar files and try running the application with
these jar files, I get the following exception:
java.io.InvalidClassException:
com.cambridgedocs.jpdf.pdo.fonts.PdoTrueTypeFont; local class
incompatible: stream classdesc serialVersionUID = -3611946473283033478,
local class serialVersionUID = 387207963493818039
at java.ibjectStreamClass.initNonProxy(ObjectStreamClass.java:463)
at
java.ibjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
at
java.ibjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at
java.ibjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at java.ibjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.ibjectInputStream.readObject(ObjectInputStream.java:324)
at
I want it to run it successfully through both ways
Can someone help??
Thanks,
Babz