[jboss-jira] [JBoss JIRA] (AS7-3308) Deployment of the same named bean in two jar files problem
Ondřej Chaloupka (JIRA)
jira-events at lists.jboss.org
Mon Jan 16 04:15:18 EST 2012
[ https://issues.jboss.org/browse/AS7-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ondřej Chaloupka resolved AS7-3308.
-----------------------------------
Resolution: Rejected
>From explication of Jaikiran Pai:
This _isn't_ a bug. The Java EE6 spec has some rules about application names (EE6 spec, section 8.1.2). In short, the application name is the name of the deployed file (unless overridden) without the .ear/.jar/.war suffix. In this case you are deploying two different deployments, ejb.jar and ejb.ear which are running into conflicts. The application deployer must ensure that these names must be unique (you can either rename the file or override the module/application name in ejb-jar.xml or application.xml).
> Deployment of the same named bean in two jar files problem
> ----------------------------------------------------------
>
> Key: AS7-3308
> URL: https://issues.jboss.org/browse/AS7-3308
> Project: Application Server 7
> Issue Type: Bug
> Reporter: Ondřej Chaloupka
> Assignee: jaikiran pai
> Labels: ejb
>
> In case of deploying jar and ear files when each of them contains bean with the same name the deploy fails with following exception occurs:
> {code}
> ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."ejb3.ear".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ejb3.ear".POST_
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Final-SNAPSHOT.jar:7.1.0.Final-SNAPSHOT]
> 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_23]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
> at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
> Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.app.ejb3 is already registered
> at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:226) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2211) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2211) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> at org.jboss.as.ee.naming.ApplicationContextProcessor.deploy(ApplicationContextProcessor.java:63)
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Final-SNAPSHOT.jar:7.1.0.Final-SNAPSHOT]
> ... 5 more
> {code}
> Test could be check on: https://github.com/ochaloup/jboss-as/commit/6edb077f9cced40a18858de1bdeb6df94513be32
> In case that this issue is caused by not correct configuration in the test please close the issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list