Due to the fact that I was unable to continue with my last topic, I have to begin a new one:
Here is the story so far...
Bob Chandler
ranch hand
Member # 64584
posted May 05, 2004 08:01 AM
--------------------------------------------------------------------------------
Hey there Java peeps,
having problems with some code I'm working on... hope you can help.
I have a class that implements Serializable and, therefore has serialVersionUID number when I run serialVer tool. I'm clear about this part.
However, when I run the part of my code which is retrieving a record from the database, I sometimes get an error that reads:
an Exception occurred: Cabin; local class incompatible: stream classdesc serialVersionUID = 3448415719576074304, local class serialVersionUID = -1390977758539970494
If I have created the record in the current session, it runs ok....
Any suggestions?
Bob
--------------------------------------------------------------------------------
Posts: 31 | Registered: Jan 2004 | IP: Logged
Jeanne Boyarsky
bartender
Member # 50496
posted May 05, 2004 06:07 PM
--------------------------------------------------------------------------------
Bob,
Well it's saying that you changed the serialver id. When this id changes, you are stating that the object should not be read in.
Did you change the id on purpose? Are old objects in the database from a previous deployment with a different id?
--------------------------------------------------------------------------------
Posts: 916 | Registered: May 2003 | IP: Logged
ok, Jeanne, I have not changed or even referred directly to the serialver id in my code.
What's this about previous deployment?
I have written methods that retrieve, modify and persist records back to the database (db is nothing fancy, just a folder in the same directory as my other code files)
The data is still there ie. it doesn't disappear between sessions and the relevant classes implement serializable.
Maybe there is something I don't yet know about - but I just want to be able to access my stored data...