posted 18 years ago
i have an object (that implements Serializable-interface) written to a file some days ago. no problems occured.
today i wanted to read the object back from the file, but the object that's in the file contains some other members of other classes (all implementing Serializable interface) and some of this classes are changed (new members, methods, etc.)
when i try to readObject from file, i got this error:
INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
java.io.InvalidClassException: be.aquafin.webgis.kaart.ComplexKaart; local class incompatible: stream classdesc serialVersionUID = -1104219041991736069, local class serialVersionUID = 150420720706126891
so if i save object to file, change some classes, try to get file back, i will always get error. or could i prevent this from happening ?
thanks for your help