Hello everyone!
I try to serialize a Class (Tree) that extends the AbstractAnnotatedAggregateRoot<Tree> and has 2 fields: private String treeId and private int rings.
As I run the serialization I get
com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.axonframework.domain.SimpleDomainEventStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: [...])
The reason for this error is, I am pretty sure, that Jackson tries to serialize the fields that are extended by the superclass.
I read that it might be a good idea to use the composite pattern instead of inheriting from AbstractAnnotatedAggregateRoot,
and it would be easy (or at least easier) to tell Jackson to ignore that field. What would it look like? Is it an option? If not:
Does anyone have an idea, what a clean and fast fix for this issue could be?
I'd be glad if someone could help me,
Thanks a lot!
robert