Deployment fail for application with multiple `org.jboss.msc.service.ServiceActivator` descriptors

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Issue

  • If multiple modules in an EAR file contain a descriptor org.jboss.msc.service.ServiceActivator the deployment fail. If only one module contain it the application can be deployed
  • An application with services will fail to deploy with the following Exception
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.subunit."jboss-cluster-ha-singleton.ear"."ejb.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."jboss-cluster-ha-singleton.ear"."ejb.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "ejb.jar" of deployment "jboss-cluster-ha-singleton.ear"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.8.Final-redhat-2.jar:7.5.8.Final-redhat-2]
	...
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.wfink.ha.singleton.serviceGroupGROUP_1.service is already registered
	at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	...

ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.subunit."jboss-cluster-ha-singleton.ear"."ejb3.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."jboss-cluster-ha-singleton.ear"."ejb3.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "ejb3.jar" of deployment "jboss-cluster-ha-singleton.ear"
	...
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.msc.service.DuplicateServiceException: Service jboss.quickstart.ha.singleton.timer.service is already registered
	at org.jboss.as.server.deployment.service.ServiceActivatorProcessor.deploy(ServiceActivatorProcessor.java:87) [jboss-as-server-7.5.8.Final-redhat-2.jar:7.5.8.Final-redhat-2]
	... 5 more
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.quickstart.ha.singleton.timer.service is already registered
	...

Resolution

The issue is tracked by This content is not included.BZ 1286272.

It will be scheduled for a 6.4 CP release.
Please open a case if you have issues with this.

Root Cause

Services are not handled correct.
A reproducer example can be found in the enlarged Content from github.com is not included.cluster-ha-singleton

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.