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

  • SEARCH
  • Home
  • 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 9254925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:35:43+00:00 2026-06-18T11:35:43+00:00

We have a very old class which doesn’t have serialVersionUID. 4 years back someone

  • 0

We have a very old class which doesn’t have serialVersionUID.

4 years back someone added serialVersionUID to this class with a random value. He should have used serialver tool to find the value and used it while adding serialVersionUID, but that was not the case.

There are customers using both the versions of this class.

Now if I want to deserialize the old customer’s objects is there any way out. I can’t change the current serialVersionUID since the new customers will be affected.

  • 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-18T11:35:44+00:00Added an answer on June 18, 2026 at 11:35 am

    You will have to write your own readObject() method that can handle the different UIDs.

    “Versioning of Serializable Objects” explains what the UID means and what the rules are.

    This answer goes into more details.

    I tried to find a good example how to write readObject() for some object that has several UIDs but couldn’t find any. There isn’t even an example in “Effective Java” by Joshua Bloch. It just says “If you change the UID, you will get an error” but not how to handle this error gracefully.

    This question at least comes close: How to deserialize an object persisted in a db now when the object has different serialVersionUID

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

Sidebar

Related Questions

I have a very old, very very large, fully working, C program which plays
I have a very old but very large library which I am considering converting
we have a very old windows program which developed with c# and with every
I have a very very old PC that is running DOS and using an
I have a very old project that includes the source from another project directly,
DirectDraw 7 is very old APIs but we have a lot legacy code written
I have a 3yr old application that has some controllers with some very unrestful
I have a plain old CLR object which is essentially a wrapper for two
I have a custom class, say the class Person, which implements the NSCoding protocol.
I have taken on the task of converting a very old classic ASP/VBScript/Access web

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.