title: RestEasy conflict in Jboss EAP 6.1
body: <p>I am trying to use Jersey to create a RESTful API. My pom.xml looks like:</p>
  
  <pre><code>&lt;!-- Jersey Library --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
              &lt;version&gt;1.18&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-bundle&lt;/artifactId&gt;
              &lt;version&gt;1.18&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;asm&lt;/groupId&gt;
              &lt;artifactId&gt;asm&lt;/artifactId&gt;
              &lt;version&gt;3.3.1&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>But I get  <code>Only one JAX-RS Application Class allowed.</code> exception while deploying the application in Jboss. However, this works very well in case of tomcat.</p>
  
  <p><strong>Stacktrace:</strong> </p>
  
  <pre><code>ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."apiinterface.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."apiinterface.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "apiinterface.war"
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed.  com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.servlet.WebAppResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ResourceConfig
          at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:206)
          at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:104)
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
          ... 5 more
  </code></pre>
  
  <p>I tried implementing answers from <a href="https://stackoverflow.com/questions/6953516/deploying-a-jersey-webapp-on-jboss-as-7">Deploying a Jersey webapp on Jboss AS 7</a> but no success so far.</p>