I got an object which should be serialized. Atm I let it implement Serializable but in runtime I get an
Failed to marshal object with optimized marhshaller:{ $heresAhugeString$ }
Failed to serialize object: { $alsoHugeString$ }
java.io.IOException: Externalizable class doesn't have default constructor: interface java.io.Externalizable
Externalizable class doesn't have default constructor: interface java.io.Externalizable
java.io.Externalizable.<init>()
The last exception (java.io.Externalizable.() comes infinite times) I try to find the non-serializable field but I only can see that it throws exception at serializing a ConcurrentHashMap. I know this aren't much information but the complete stacktrace is quite big. Any tips how to find out which field in the map is responsible for non-serialization ? Or which information should I add ? Regards
I don't know what type of deserialization you are doing, but if you don't need use this field after unmarshalling, then you must set it as
transient.The
transientjava keyword can be used if your are use the Java Serialization, or@Transientif you are using JPA, or even@JsonIgnorePropertiesif you are using Jackson