Comment configurer Jackson dans Wildfly?

J'ai un Bean Session avec la méthode suivante:

@POST
@Consumes("application/x-www-form-urlencoded")
@Path("/calculate")
@Produces("application/json")
public CalculationResult calculate(@FormParam("childProfile") String childProfile,
        @FormParam("parentProfile") String parentProfile) {
...
}

Le retour de l'CalculationResult ne peut pas être mappé en JSON et l'exception suivante se produit:

Caused by: com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class com.test.UniqueName and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)...

Comment puis-je configurer Jackson et son SerializationFeature dans Wildfly?

OriginalL'auteur sebplorenz | 2015-02-03