Troubleshooting
Versioning Problems
Q1: | All I did was change a method; why can't I deserialize my data anymore? |
Any change to a class makes it incompatible with the previous version unless you use the serialVersionUID field. |
Networking Problems
Q1: | Why won't my client and server talk to each other when using object streams? |
You must make absolutely sure that you flush the ObjectOutputStreamafter you create it (before you write any data). It writes some header information that the ObjectInputStream constructor tries to read. |
Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.