Hello there,
I have a Logger instance (log4j library) in a class:
private final static Logger logger = Logger.getLogger(Person.class.getName());
When I try to serialize an object of that class it gives me the following:
com.fasterxml.jackson.databind.JsonMappingException:
No serializer found for class org.apache.log4j.helpers.NullEnumeration and no properties discovered to create BeanSerializer
(to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) )
(through reference chain:
com.vmware.vscale.core.AppState["logger"]->org.apache.log4j.Logger["parent"] >org.apache.log4j.spi.RootLogger["allAppenders"])
Adding @JsonIgnore, ignores it and everything works. However, when using the deserialized object it doesn't log anymore...
So the question is, what is a good way to take care of a logger? I just need to have it logging after it's deserialized.
Thank you,
Dimitris