SerialVersionUID with "private static final long" still gets InvalidClassException

Posted by Buggieboy on Stack Overflow See other posts from Stack Overflow or by Buggieboy
Published on 2010-04-27T20:48:56Z Indexed on 2010/04/27 20:53 UTC
Read the original article Hit count: 271

Filed under:
|

I have compiled and jarred the various projects in my Java application, generating serialVersionUIDs automatically through Eclipse for all my classes derived from Serializable.

I read the answers to this question, and verified that serialVersionUids are all private static final long.

Nevertheless, I get an error like this when I try to run:

java.io.InvalidClassException: com.acme.product.Widget; local class incompatible: stream classdesc serialVersionUID = 5226096973188250357, local class serialVersionUID = -5432967318654384362

What am I missing?

© Stack Overflow or respective owner

Related posts about java

Related posts about serialization