[jboss-jira] [JBoss JIRA] Updated: (AS7-1560) resource-ref without a specific mapped name or lookup name leads to circular service dependency exception
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Wed Aug 17 14:34:17 EDT 2011
[ https://issues.jboss.org/browse/AS7-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jaikiran pai updated AS7-1560:
------------------------------
Workaround Description: Add an explicit lookup-name to point to the jndi name from where the resource can be fetched from and bound into ENC.
Workaround: [Workaround Exists]
Forum Reference: http://community.jboss.org/thread/170975 (was: http://community.jboss.org/thread/170975)
> resource-ref without a specific mapped name or lookup name leads to circular service dependency exception
> ---------------------------------------------------------------------------------------------------------
>
> Key: AS7-1560
> URL: https://issues.jboss.org/browse/AS7-1560
> Project: Application Server 7
> Issue Type: Bug
> Components: EE
> Environment: AS7 upstream
> Reporter: jaikiran pai
> Assignee: Stuart Douglas
>
> Consider the following in web.xml (as an example):
> {code}
> <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>
> {code}
> This results in a BindingConfiguration for jdbc/DB1 whose injection source is a LookupInjectionSource pointing (back) to jdbc/DB1 which ultimately leads to:
> {code}
> 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
> {code}
> 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.
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list