[jboss-jira] [JBoss JIRA] Updated: (EJBTHREE-1431) @Resource Injection fails when jboss.xml declares resource-ref/jndi-name, expecting mapped-name
Andrew Lee Rubinger (JIRA)
jira-events at lists.jboss.org
Mon Jul 7 15:42:33 EDT 2008
[ http://jira.jboss.com/jira/browse/EJBTHREE-1431?page=all ]
Andrew Lee Rubinger updated EJBTHREE-1431:
------------------------------------------
Attachment: test-mapped-name.jar
Attached deployable unit failing in AS5 CR1
> @Resource Injection fails when jboss.xml declares resource-ref/jndi-name, expecting mapped-name
> -----------------------------------------------------------------------------------------------
>
> Key: EJBTHREE-1431
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-1431
> Project: EJB 3.0
> Issue Type: Bug
> Components: core
> Affects Versions: AS 5.0.0.CR1
> Reporter: Andrew Lee Rubinger
> Assigned To: Andrew Lee Rubinger
> Attachments: test-mapped-name.jar
>
>
> Using jboss.xml:
> <jboss>
> <enterprise-beans>
> <session>
> <ejb-name>TestBean</ejb-name>
> <jndi-name>local/base/Test</jndi-name>
> <local-jndi-name>local/base/Test</local-jndi-name>
> <resource-ref>
> <res-ref-name>com.promca.test.ejb.Test/datasource</res-ref-name>
> <jndi-name>java:/DefaultDS</jndi-name>
> </resource-ref>
> </session>
> </enterprise-beans>
> </jboss>
> ..and Injection:
> @Stateless
> public class TestBean implements Test {
> @Resource
> private DataSource datasource;
> public void execute() {
> System.out.println("Executing...");
> }
> }
> Error is:
> Caused by: java.lang.RuntimeException: mapped-name is required for datasource of deployment TestBean
> at org.jboss.injection.ResourceHandler.loadXmlResourceRefs(ResourceHandler.java:176)
> at org.jboss.injection.ResourceHandler.loadXml(ResourceHandler.java:327)
> at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:561)
> at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:392)
> at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:505)
> at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:185)
> ... 21 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list