I\'ve got an object that im reading and writing to and from fileinputstreams/objectinputstreams and objectinputstreams/objectoutputstreams. I keep
As stated in documentation this can happen for three different reasons:
So, first of all check that both implementations have the same serialVersionUID. If this is true you have to be sure that the class doesn't use any type that is undefined (or unknown) to the JVM you are trying to deserialize into. Finally you need to provide a standard constructor ClassName() which does empty initialization.
These can be the problems and surely it's one of these, so I don't think you should look forward something weird. From my personal experience I can add also that using different JVM versions to serialize and deserialize can create this problem, so be sure of it too.