0 Replies Latest reply on Feb 15, 2016 3:15 AM by kiran reddy

    RESTEasy + Jackson2 integration

    kiran reddy Newbie

      Hi,

       

      I am trying to use jackson 2 with Rest Easy

       

      POM :

       

      <!-- resteasy start -->

          <dependency>

            <groupId>org.jboss.resteasy</groupId>

            <artifactId>resteasy-jaxrs</artifactId>

            <version>3.0.13.Final</version>

            <scope>provided</scope>

          </dependency>

          <dependency>

            <groupId>org.jboss.resteasy</groupId>

            <artifactId>resteasy-jackson2-provider</artifactId>

            <version>3.0.13.Final</version>

            <scope>provided</scope>

          </dependency>

          <!-- resteasy end -->

       

          <!-- jackson imports starts -->

          <dependency>

            <groupId>com.fasterxml.jackson.core</groupId>

            <artifactId>jackson-core</artifactId>

            <version>2.4.1</version>

          </dependency>

          <dependency>

            <groupId>com.fasterxml.jackson.core</groupId>

            <artifactId>jackson-databind</artifactId>

            <version>2.4.1</version>

          </dependency>

          <dependency>

            <groupId>com.fasterxml.jackson.core</groupId>

            <artifactId>jackson-annotations</artifactId>

            <version>2.4.1</version>

          </dependency>

          <dependency>

            <groupId>com.fasterxml.jackson.jaxrs</groupId>

            <artifactId>jackson-jaxrs-json-provider</artifactId>

            <version>2.4.1</version>

          </dependency>

          <dependency>

            <groupId>com.fasterxml.jackson.jaxrs</groupId>

            <artifactId>jackson-jaxrs-base</artifactId>

            <version>2.4.1</version>

          </dependency>

       

       

          <!-- jackson import ends -->

       

      Deployment structure :

       

      <jboss-deployment-structure>

        <deployment>

          <exclusions>

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

          </exclusions>

          <dependencies>

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

          </dependencies>

        </deployment>

      </jboss-deployment-structure>

       

       

      But when i try to start the server, JBOSS module not able to find the required lib:

       

       

      org.jboss.modules.ModuleNotFoundException: org.jboss.resteasy.resteasy-jackson2-provider:main

        at org.jboss.modules.Module.addPaths(Module.java:1050) [jboss-modules.jar:1.3.3.Final-redhat-1]

        at org.jboss.modules.Module.link(Module.java:1406) [jboss-modules.jar:1.3.3.Final-redhat-1]

        at org.jboss.modules.Module.relinkIfNecessary(Module.java:1434) [jboss-modules.jar:1.3.3.Final-redhat-1]

        at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:242) [jboss-modules.jar:1.3.3.Final-redhat-1]

        at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) [jboss-as-server-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1]

        ... 5 more

       

       

      I have tried with out Scope as 'provided' as well still it fail to start the container.

       

      JBOSS version :  JBoss EAP 6.2.4.GA (AS 7.3.4.Final-redhat-1)

       

      Any insights is really helpful

       

      Thanks