When I read the about the Serializable interface in Thinking in java, there is a sentence that says:
If you use the default
Java Object Serialization Specification is vague on this subject:
Either
ObjectOutputStream'sdefaultWriteObjectorwriteFieldsmethod must be called once (and only once) before writing any optional data that will be needed by the correspondingreadObjectmethod to restore the state of the object; even if no optional data is written,defaultWriteObjectorwriteFieldsmust still be invoked once. IfdefaultWriteObjectorwriteFieldsis not invoked once prior to the writing of optional data (if any), then the behavior of instance deserialization is undefined in cases where theObjectInputStreamcannot resolve the class which defined thewriteObjectmethod in question.
Here's an old thread which gives an example case when problems might occur.
And here's a JBoss AS Jira ticket with another example.