Running into this problem with my object tree, which I cannot modify (testing already written code).
The serialization goes up the tree until it encounters a GTKLookAndFeel object. This class extends SynthLookAndFeel which throws a NotSerializableException as part of its writeObject method. The SynthLookAndFeel class comments state:
- This class implements
as a side effect of it
. It is not intended to be serialized.
- An attempt to serialize it will
- result in
While this might not be very clean implementation for SynthLookAndFeel, it shouldn't prevent XStream to serialize the tree using a different converter, instead of the current behavior of throwing a ConversionException.