2 Replies Latest reply on May 5, 2014 5:23 AM by Tomaz Cerar

    How to have resteasy use jackson 2 in wildfly 8.0 / 8.1

    Philippe Nicolai Newbie

      I was expecting to have Resteasy use version 2.x of jackson but when looking at the root cause of an exception on json serialization of the return of a REST call, it looks like  resteasy 3.0.6 is using jackson 1.9.x.

       

      I switched from Wildfly 8.0  to 8.1  (OOB deployments) but am getting the same problem.

      Although I can use jackson 2 within my App, resteasy keeps using 1.9 and causing me troubles.


      How can one get resteasy use jackson 2 ?

       

      Thanks for your help

       

      Caused by: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.opscope.model.ci.impl.memory.MemoryElementIterator and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.ArrayList[0]->com.opscope.model.ci.impl.memory.NodeType["srcElements"])

        at org.codehaus.jackson.map.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:52) [jackson-mapper-asl-1.9.13.jar:1.9.13]

        at org.codehaus.jackson.map.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:25) [jackson-mapper-asl-1.9.13.jar:1.9.13]

        at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446) [jackson-mapper-asl-1.9.13.jar:1.9.13]

        at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150) [jackson-mapper-asl-1.9.13.jar:1.9.13]

        at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112) [jackson-mapper-asl-1.9.13.jar:1.9.13]

      [resteasy-jaxrs-3.0.6.Final.jar:]

        at org.jboss.resteasy.core.interception.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:62) [resteasy-jaxrs-3.0.6.Final.jar:]