1 Reply Latest reply on Nov 29, 2012 9:09 AM by kieselhorst

    How do I get rid of RESTEasy modules from default standalone config

    Paul Hinds Newbie

      I'm using RESTEasy in an EAR and I include the resyeasy JARs in the EAR, and just the JARs I need, specifically we exclude the jaxb provider, if it is present on the classpath it takes over and mangles the JSON output.

       

      I'm upgrading to JB7 and it seems that by default the resteasy-jaxb-provider is already on the EARs classpath.

       

      I can test for the existence of the provider as follows

       

      try {

          Class.forName("org.jboss.resteasy.annotations.providers.jaxb.JAXBConfig");

          log.error("JAXBConfig on classpath");

      } catch (Throwable e) {

          log.info("JAXBConfig not on classpath");

      }

       

      I've tried adding a jboss-deployment-structure.xml as follows

       

      <jboss-deployment-structure>

          <deployment>

              <exclusions>

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

              </exclusions>

              <dependencies>

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

              </dependencies>

          </deployment>

          <sub-deployment name="my.war">

              <exclusions>

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

              </exclusions>

          </sub-deployment>

      </jboss-deployment-structure>

       

      But my test still shows that jaxb is on the classpath.

       

      I tried removing <extension module="org.jboss.as.jaxrs"/> from standalone.xml but JBoss will not boot without it.

       

      any one got any ideas?