0 Replies Latest reply on Aug 15, 2013 12:16 AM by andrew.s

    Unable to get RestEasy in JBoss 7.2 to use jackson-provider2

    andrew.s Newbie

      I am using JBoss AS 7.2.0 with an upgraded RestEasy to version 3.0.1.Final.  I am deploying an EAR with a WAR and EJB module.  The the only thing the WAR has in it is REST service.  My EJB Pojos have circular references, so I would like to use the new Jackson 2 @JsonIdentityInfo.



      The REST service is loaded via the web.xml attached.


      <web-app xmlns="http://java.sun.com/xml/ns/javaee"


            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"



          <display-name>Archetype Created Web Application</display-name>





























      I'm using all JBoss provided Jackson/JAX-RS Maven dependencies in my Maven POM files, scoped as provided.  In my EAR META-INF directory I have a jboss-deployment-structure.xml file that looks like this:


      <?xml version="1.0" encoding="UTF-8"?>




                 <module name="org.jboss.resteasy.resteasy-jackson-provider"/>



                  <module name="org.jboss.resteasy.resteasy-jackson2-provider" services="import"/>






      My EJB POJO has the @JsonIdentityInfo annotation on it.  I make a call into my REST service and when the POJO is being serialized by RESTEasy (method is flagged as @Produces("application/json") I get a huge exception stack that basically ends in a stack overflow (meaning that Jackson is in the circular reference loop and not adhering to the Identity Info annotation).  The jar being used at this point is jackson-mapper-asl-1.9.12.jar and not the Jackson 2 jar.


      Any thoughts on what I may be doing wrong or why this isn't working as expected?  I can post additional information if needed.


      Thanks in advance,