5 Replies Latest reply on Apr 16, 2014 4:30 PM by master2q

    jackson @JsonSerialize  annotation is not working with Seam/RestEasy with JBoss EAP 6.1.0.Alpha1 (AS 7.2.0.Alpha1-redhat-4)

    dozer247

      Hi,

       

      I've tried deploying  our Seam 2.3.1.Final app to JBoss EAP 6.1.0.Alpha1 (AS 7.2.0.Alpha1-redhat-4) and our RestEasy api is not working correctly anymore.

      In Jboss AS 7.1.1 Final our json response was like

       

      {
          "checklists": {
              "templates": [
                  {
                      "id": 12434654,
                      "name": "Retail Operations audit"
                  },
                  {
                      "id": 12435536,
                      "name": "test Checklist"
                  }
              ]
          }
      }
      

       

      now in  JBoss EAP 6.1.0.Alpha1 (AS 7.2.0.Alpha1-redhat-4) it like

       

      {
      
          "checklists": {
              "templates": [
                  {
                      "id": 12434654,
                      "name": "Retail Operations audit",
                      "date": null,
                      "siteName": null,
                      "customerName": null,
                      "address": null
                  },
                  {
                      "id": 12435536,
                      "name": "test Checklist",
                      "date": null,
                      "siteName": null,
                      "customerName": null,
                      "address": null
                  }
              ]
          }
      }
      
      

      For some reason its ignoring our @JsonSerialize annotations which come from the jackson-mapper-asl-1.9.10.jar  which is in our lib directory.

       

      our jboss-deployment-structure.xml looks like

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
        <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
        <deployment>
         <exclusions>
            <module name="javax.xml.bind.api"/>
            <module name="org.apache.cxf" />
            <module name="javax.ws.rs.api"/>
            <module name="org.codehaus.jackson.jackson-core-asl" />
            <module name="org.codehaus.jackson.jackson-jaxrs"/>
            <module name="org.codehaus.jackson.jackson-mapper-asl"/>
            <module name="org.codehaus.jackson.jackson-xc"/>
            <module name="org.jboss.resteasy.resteasy-atom-provider" />
            <module name="org.jboss.resteasy.resteasy-cdi" />
            <module name="org.jboss.resteasy.resteasy-crypto" />
            <module name="org.jboss.resteasy.resteasy-jackson-provider" />
            <module name="org.jboss.resteasy.resteasy-jaxb-provider" />
            <module name="org.jboss.resteasy.resteasy-jaxrs" />
            <module name="org.jboss.resteasy.resteasy-jettison-provider" />
            <module name="org.jboss.resteasy.resteasy-jsapi" />
            <module name="org.jboss.resteasy.resteasy-json-p-provider" />
            <module name="org.jboss.resteasy.resteasy-multipart-provider" />
            <module name="org.jboss.resteasy.resteasy-validator-provider-11" />
            <module name="org.jboss.resteasy.resteasy-yaml-provider" />
          </exclusions>
          <dependencies>
            <module name="org.hibernate" export="true"/>
            <module name="javax.faces.api" export="true" />
            <module name="com.sun.jsf-impl" export="true"/>
            <module name="org.dom4j" export="true"/>
            <module name="org.hibernate.validator" export="true"/>
            <module name="com.sun.xml.bind" export="true"/>
            <system export="true">
            <paths>
              <path name="com/sun/org/apache/xerces/internal/dom"/>
              </paths>
             </system>
          </dependencies>
        </deployment>
        <sub-deployment name="1place.war">
          <dependencies>
              <module name="org.hibernate" export="true"/>
        <module name="com.sun.xml.bind" export="true"/>
                   <system>
                          <paths>
                              <path name="com/sun/org/apache/xerces/internal/dom"/>
                          </paths>
                      </system>
          </dependencies>
        </sub-deployment>
        <sub-deployment name="1place-api.war">
          <dependencies>
              <module name="org.hibernate" export="true"/>
        <module name="com.sun.xml.bind" export="true"/>
               <system>
                     <paths>
                             <path name="com/sun/org/apache/xerces/internal/dom"/>
                      </paths>
               </system>
          </dependencies>
        </sub-deployment>
      </jboss-deployment-structure>
      
      

       

      Does anyone have an idea on what i've missed or why it is behaving like this?

       

      Thanks in advance