[jboss-jira] [JBoss JIRA] (WFCORE-3429) DuplicateServiceException when artifact name equals to alias

jaikiran pai (JIRA) issues at jboss.org
Mon Nov 27 04:32:00 EST 2017


    [ https://issues.jboss.org/browse/WFCORE-3429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494005#comment-13494005 ] 

jaikiran pai commented on WFCORE-3429:
--------------------------------------

The exception looks correct to me. In your jboss-deployment-structure.xml you are giving a (new) alias for the deployment module and happen to use the same name as the default module name (deployment.moduleA.ear in this case) for the deployment. Which effectively means that you are using a duplicate name for the module.

> DuplicateServiceException when artifact name equals to alias
> ------------------------------------------------------------
>
>                 Key: WFCORE-3429
>                 URL: https://issues.jboss.org/browse/WFCORE-3429
>             Project: WildFly Core
>          Issue Type: Task
>          Components: Server
>    Affects Versions: 2.2.0.Final
>            Reporter: Сергей Машкевич
>            Assignee: Jason Greene
>            Priority: Minor
>              Labels: support
>
> Suppose that there is an artifact «moduleA.ear» with the following deployment descriptor:
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <jboss-deployment-structure>
>     <deployment>
>         <module-alias name="deployment.moduleA.ear"/>
>     </deployment>
> </jboss-deployment-structure>
> {code}
> When I try to deploy this module on *WildFly 10.1.0*, I get the DuplicateServiceException:
> {code:java}
> jboss.deployment.unit."moduleA.ear".CONFIGURE_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."moduleA.ear".CONFIGURE_MODULE: WFLYSRV0153: Failed to process phase CONFIGURE_MODULE of deployment "moduleA.ear"
>          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
>          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
>          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
>          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>          at java.lang.Thread.run(Thread.java:745)
> Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.module.spec.service."deployment.moduleA.ear".main is already registered
>          at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158)
>          at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235)
>          at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:768)
>          at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
>          at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
>          at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
>          at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
>          at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317)
>          at org.jboss.as.server.deployment.module.ModuleSpecProcessor.createModuleService(ModuleSpecProcessor.java:263)
>          at org.jboss.as.server.deployment.module.ModuleSpecProcessor.deployModuleSpec(ModuleSpecProcessor.java:124)
>          at org.jboss.as.server.deployment.module.ModuleSpecProcessor.deploy(ModuleSpecProcessor.java:87)
>          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
>          ... 5 more
> {code}
> I think this exception should not be thrown in this case. Could you fix it?
> Thanks,
> Sergey Mashkevich



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list