Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3756

RESTEasy: Deployment fails if there is more than one EJB-JAR in the EAR

    XMLWordPrintable

Details

    • Hide

      Create an EAR with two EJB-JARs and one WAR.
      Place a class like this in ONE of the EJB-JARs:

      @ApplicationPath("services")
      public class RestService extends javax.ws.rs.core.Application { }
      
      Show
      Create an EAR with two EJB-JARs and one WAR. Place a class like this in ONE of the EJB-JARs: @ApplicationPath( "services" ) public class RestService extends javax.ws.rs.core.Application { }

    Description

      If there is more than one EJB-JAR in the EAR, deployment of Restful webservice fails:

      22:01:53,351 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit."profiles.ear"."profiles.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."profiles.ear"."profiles.war".INSTALL: Failed to process phase INSTALL of subdeployment "profiles.war" of deployment "profiles.ear"
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_30]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_30]
              at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011231: More than one Application class found in deployment class com.buschmais.hr.profiles.rest.service.RestService and class com.buschmais.hr.profiles.rest.service.RestService
              at org.jboss.as.jaxrs.deployment.ResteasyDeploymentData.merge(ResteasyDeploymentData.java:38)
              at org.jboss.as.jaxrs.deployment.JaxrsIntegrationProcessor.deploy(JaxrsIntegrationProcessor.java:93)
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]
              ... 5 more
      

      Please note, that there is only one class "com.buschmais.hr.profiles.rest.service.RestService" in the deployment unit. Please don't bother me to check if the class is both in the EAR and the WAR. Be assured that it is not!

      This is also not RESTEASY-650.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            fs5_jira Frank Schwarz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: