Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8260829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:11:22+00:00 2026-06-08T03:11:22+00:00

My org uses a custom serialization technique, where we store objects iteratively using an

  • 0

My org uses a custom serialization technique, where we store objects iteratively using an output stream. I’m running into the following issue:

Parent and Child classes implement Serializable. Parent class has fields a,b,c, and Child class has e. I added the field d to Parent and updated the parent’s serialization, and now our old clients cannot read the Child serialization code properly. This is because the Child serialization code goes:

OutputStream in = getCurrentOutStream();

current_serialization_num = readVersionNum(in) // The version num is similar to Java's UID and is updated when fields are added.
readParent(in)
e = readField(in)

Since the serialization is done through a DataOutputStream, good XML reader can’t take care of this. I have an ugly solution to this problem, but it won’t extend well at all, so I’d rather not pollute the reader’s mind by introducing it. However, I’d really like to hear how other’s would handle a similar situation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:11:23+00:00Added an answer on June 8, 2026 at 3:11 am

    Objects created by old Parent got serialized by the old serialVersionUID. New objects get serialized by new serialVersionUID.
    The way you are implementing that, Child cannot read the old objects as well as the new one at the same time.

    You either have to have a same serialVersionUID. If compiler complains put a suppress annotation. You want to clearly communicate compiler it is the same object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jboss-as-7.1.0.Final-SNAPSHOT and trying to set up custom login module that uses
I've the following code that uses jQueryMobile Sliders: <!DOCTYPE html> <html xmlns=http://www.w3.org/1999/xhtml> <head> <meta
I have a class that uses org.apache.ant and the class is very simple, it's
I have a website pune.org that uses places API. As you can see however
The datanode-namenode communication uses the org.apache.hadoop.ipc package; while the inter-datanode communication is based on
I'm currently working my way through http://www.railstutorial.org/ It uses Rspec along with a TDD
JSON web site uses very clear notation to describe JSON's syntax: (source: json.org )
My website uses: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml> And
Our maven/Netbeans platform application uses a custom image on startup, by replacing Nbm-branding >
I'm using the following code to make a div overlay. If the links login

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.