java.io.InvalidClassException: MacroData; Local class not compatible
at
java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:219)
at
java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:639)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:276)
at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java:820)
.
.
.
.
My understanding of the serialization is that I should be able to add
fields and still deserialize old data. This is from the docs on
Serialization:
"The defaultReadObject method uses information in the stream to assign
the fields of the object saved in the stream with the correspondingly
named fields in the current object. This handles the case when the
class has evolved to add new fields."
I have even tried marking the new field "transient", but I still get
the same exception. Any thoughts?
----
Bill Tschumy
Vignette Corp. -- Austin, TX
bi...@vignette.com
static final long serialVersionUID = 4021215565287364875L;
in my modified class. The actual value of this long is gotten from
the "serialver" utilitity suppied with the JDK. Any versions of a
class other than the first version require this static to be defined
in the class.
Happy coding.
On Thu, 19 Jun 1997 16:07:48 GMT, bi...@vignette.com (Bill Tschumy)
wrote: