I think we can not deserialize the object keeping the updated serialVersionUID.
It is because serialVersionUID is an exception to the rule that “static fields don’t get serialized”.
ObjectOutputStream writes every time the value of serialVersionUID to the output stream.
ObjectInputStream reads it back and if the value read from the stream does not agree with the serialVersionUID value in the current version of the class, then it throws the InvalidClassException.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Object deserialiaztion .... with different versionUid