Hi...
we use the SUN CachedRowSetImpl (currently Tiger 1.01) reference
implementation for a while in server-client data exchange just fine. Now
we are trying to experiment with clients wunning on jdk1.5_03 and get
the following error (excerpt):
java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.io.InvalidClassException:
javax.sql.rowset.RowSetMetaDataImpl$ColInfo; local class incompatible:
stream classdesc serialVersionUID = 4431284943651249319, local class
serialVersionUID = 5490834817919311283
Is there any version of the CachedRowSetImpl for 1.4.2 that is
compatible with 1.5? I was not able to google up any.
Ciao
...Jochen
> java.rmi.UnmarshalException: error unmarshalling return; nested
>exception is:
> java.io.InvalidClassException:
Almost every Sun Java class warns you that code between versions is
incompatible. Serialization is for temporary storage only. For long
term storage you need your own object that persists the crucial
parameters about the Component. This will be considerably smaller than
Sun's object which is mostly full of defaults.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Roedy Green - 18 Sep 2005 20:49 GMT
>Almost every Sun Java class warns you that code between versions is
>incompatible. Serialization is for temporary storage only. For long
>term storage you need your own object that persists the crucial
>parameters about the Component. This will be considerably smaller than
>Sun's object which is mostly full of defaults.
I just changed some code that persisted BigInteger to avoid such
problems by using a DataOutputStream instead.
On the other paw, one thing ObjectStreams do is automatically check
the format for you. With DataInputStream, you can eat any stream of
bytes reading totally the wrong file and never know it.
You had better put some signature/version information at the head.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.