How can I deploy JAX-RS Web Services based something other than RESTEasy in EAP 6?

Solution Verified - Updated -

Issue

  • Is it possible to deploy JAX-RS based REST webservices using something other than RESTEasy (e.g. CXF, Jersey) in EAP 6?
  • How to deactivate RESTEasy and deploy another JAX-RS library. How is that possible?
  • When Users try to deploy a JAX-RS REST Web Services based in Jersey they get following error:
DEPLOYMENTS IN ERROR:
  Deployment "vfs:///D:/tools/Jboss/jboss-6.0/server/default/deploy/jersey-test.war" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: JBAS011232:  Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.ApplicationAdapter

    at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.2.GA]
    at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]
    at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0.Final]
    at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56)  at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
    at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
org.jboss.msc.service.StartException in service jboss.deployment.unit."DialogRapidEz-5.7.ear".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "DialogRapidz.ear"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
      ......................................
...............................................
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed.  com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • JAX-RS
      • Jersey RESTful Web Services (1.x, 2.7)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.