DuplicateServiceException for datasources
-----------------------------------------
Key: WFLY-4904
URL:
https://issues.jboss.org/browse/WFLY-4904
Project: WildFly
Issue Type: Bug
Components: JCA
Affects Versions: 10.0.0.Alpha4
Reporter: Jesper Pedersen
Assignee: Eduardo Martins
Priority: Blocker
Fix For: 10.0.0.Beta1
{noformat}
2015-07-10 01:30:56,916 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-3)
WFLYEJB0473: JNDI bindings for session bean named 'DataSourceBean' in deployment
unit 'deployment
"ejblite_packaging_war_datasource_singleton_ejblitejsp_vehicle_web.war"' are
as follows:
java:global/ejblite_packaging_war_datasource_singleton_ejblitejsp_vehicle_web/DataSourceBean!com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceIF
java:app/ejblite_packaging_war_datasource_singleton_ejblitejsp_vehicle_web/DataSourceBean!com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceIF
java:module/DataSourceBean!com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceIF
java:global/ejblite_packaging_war_datasource_singleton_ejblitejsp_vehicle_web/DataSourceBean
java:app/ejblite_packaging_war_datasource_singleton_ejblitejsp_vehicle_web/DataSourceBean
java:module/DataSourceBean
2015-07-10 01:30:56,949 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2)
MSC000001: Failed to start service
jboss.deployment.unit."ejblite_packaging_war_datasource_singleton_ejblitejsp_vehicle_web.war".INSTALL:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."ejblite_packaging_war_datasource_singleton_ejblitejsp_vehicle_web.war".INSTALL:
WFLYSRV0153: Failed to process phase INSTALL of deployment
"ejblite_packaging_war_datasource_singleton_ejblitejsp_vehicle_web.war"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
[wildfly-server-2.0.0.Alpha6.jar:2.0.0.Alpha6]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_40]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
org.jboss.msc.service.DuplicateServiceException: Service
jboss.data-source.java:comp/env/compds2 is already registered
at
org.jboss.as.connector.deployers.datasource.DataSourceDefinitionInjectionSource.getResourceValue(DataSourceDefinitionInjectionSource.java:175)
at
org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:211)
at
org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:182)
at
org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
at
org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:186)
at
org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:143)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
[wildfly-server-2.0.0.Alpha6.jar:2.0.0.Alpha6]
... 5 more
Caused by: org.jboss.msc.service.DuplicateServiceException: Service
jboss.data-source.java:comp/env/compds2 is already registered
at
org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at
org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:768)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at
org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at
org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317)
[jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at
org.jboss.as.connector.deployers.datasource.DataSourceDefinitionInjectionSource.startDataSource(DataSourceDefinitionInjectionSource.java:274)
at
org.jboss.as.connector.deployers.datasource.DataSourceDefinitionInjectionSource.getResourceValue(DataSourceDefinitionInjectionSource.java:171)
... 11 more
{noformat}