CachedRowSetImpl in 1.5 incompatible to Tiger 1.01 ref impl

Discussion in 'Java' started by Jochen Riekhof, Sep 16, 2005.

  1. 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:
    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.


    Jochen Riekhof, Sep 16, 2005
    1. Advertisements

  2. Jochen Riekhof

    Roedy Green Guest

    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.
    Roedy Green, Sep 17, 2005
    1. Advertisements

  3. Jochen Riekhof

    Roedy Green Guest

    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.
    Roedy Green, Sep 18, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.