2 Replies Latest reply on Mar 7, 2012 10:53 AM by zeeman

    Correct way for (not) deploying RestEasy in JBoss 7.1 Apps?

    Tim H. Newbie



      my servlet uses resteasy-jaxrs and resteasy-jaxb-provider, both in version 2.3.1.GA. I configured the POM to use them. I can deploy my servlet with both of them and it runs in JBoss 7.1.


      However, as JBoss provides these modules, I would like to use the JBoss ones. When I mark both dependencies as "provided" in my Maven POM together with the following plugin, JBoss deploys the app:















      However, at runtime, I get this error message:


      java.lang.NoClassDefFoundError: org/jboss/resteasy/client/ClientRequest


      I wonder why JBoss can't find it. Can anyone tell me what's wrong with my approach? Any help is greatly appreciated! Of course, I can provide more information about this case.






        • 2. Re: Correct way for (not) deploying RestEasy in JBoss 7.1 Apps?
          zeeman Novice

          Your mvn config does not look right. Find a good example of how to add dependencies to as7 via maven.


          An alternative way of doing this: create a file named jboss-deployment-structure.xml under web-inf and put in it your depenendencies. What I use:




          <!--               <exclusions> -->

          <!--               </exclusions>  -->


                          <module name="org.apache.commons.collections" />

                          <module name="org.apache.commons.codec" />

                          <module name="org.codehaus.jackson.jackson-mapper-asl" />

                          <module name="org.codehaus.jackson.jackson-core-asl" />

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

                                 <module name="org.jboss.logging" />

                                <module name="org.jboss.logmanager" />

                                <module name="org.apache.httpcomponents" />