-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
Workaround Exists
-
Consider the following in web.xml (as an example):
<resource-ref> <res-ref-name>jdbc/DB1</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref>
This results in a BindingConfiguration for jdbc/DB1 whose injection source is a LookupInjectionSource pointing (back) to jdbc/DB1 which ultimately leads to:
23:52:34,088 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."multiple-bindings-superclass.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."multiple-bindings-superclass.war".INSTALL: Failed to process phase INSTALL of deployment "multiple-bindings-superclass.war" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21] at java.lang.Thread.run(Thread.java:619) [:1.6.0_21] Caused by: org.jboss.msc.service.CircularDependencyException: Service jboss-as has a circular dependency at org.jboss.msc.service.ServiceContainerImpl.detectCircularity(ServiceContainerImpl.java:617) at org.jboss.msc.service.ServiceContainerImpl.detectCircularity(ServiceContainerImpl.java:588) at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:562) at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2194) at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2194) at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) at org.jboss.as.ee.component.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:191) at org.jboss.as.ee.component.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:88) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) ... 5 more
Note that the configuration above is missing a lookup-name or an explicit pointer to where the resource is going to come from, to bind it to the ENC. In previous versions we just threw an error about incomplete data (i.e. no explicit lookupname or mapped name configured) to generate that binding. I think we need to do the same in AS7.
Note that the problem probably isn't specific to resource-ref and might involve env-entry, @Resource and other such binding/injection configurations.