I am not writing anything to disk however. It is purely a client/
server thing situation.
I did not originally use serialVersionUID.
I dont necessarily want to use it now.
So what do I need to do now that ArrayList has been added?
On Thursday29,Nov 2007, at 5:43 PM, Rick Genter wrote:
On Nov 29, 2007, at 3:00 PM, Adrian Bartholomew wrote:
I have a client/server app using an object called User that
implements Serializable in the shared package.
Everything worked perfectly up until i added an ArrayList of class
UserStatus to the User members.
Now I keep getting:
java.io.InvalidClassException: User; local class incompatible:
stream classdesc serialVersionUID = xxxxxxxxxxxxx, local class
serialVersionUID = yyyyyyyyyyyy
In my experience that message means that the implementation of the
class that is deserializing the object doesn't have the same
implementation of the class that serialized the object. This can
happen if you write your object to disk, change the object's class'
signature, then try to read the object back from disk. If you don't
specify serialVersionUID one gets computed from the class'
signature. If you didn't have a serialVersionUID when you serialized
the object, then added your ArrayList, then ran serialver to
determine the serialVersionUID, you'll get a different
serialVersionUID than the one that was used when the object was
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden