I am using SimpleXML to serialize(write to XML) without any problem. But, when I try to read and deserialize to XML I get following exception. I am using lombok plugin to give constructors such as " @RequiredArgsConstructor".
The error message is : "org.simpleframework.xml.core.PersistenceException: Constructor not matched for class A".
If you want I can provide codes for more detailed information
Does the class A
have a constructor without arguments? Those are needed for deserialization (can private though).
If you have only constructors with argument, the serializer can't create default constructed objects on reading. As this is not necessary on writing, you don't get the error there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With