Output is
We get 2 NotSerializableExceptions during write operations & 2 during read.
WriteAbortedException API - "Signals that one of the ObjectStreamExceptions was thrown during a write operation. Thrown during a read operation when one of the ObjectStreamExceptions was thrown during a write operation".
But, how the last stack trace printed includes the 1st failed write operation error message rather than the 2nd failed write?
(What I expected was
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: vino_java.NonSerializableClass in the last stack trace.)
Any idea why this happens?