[jboss-jira] [JBoss JIRA] Updated: (EJBTHREE-1858) NPE if in resource-env-ref no injection target is specified
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Fri Jul 10 05:28:29 EDT 2009
[ https://jira.jboss.org/jira/browse/EJBTHREE-1858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jaikiran pai updated EJBTHREE-1858:
-----------------------------------
Component/s: core
> NPE if in resource-env-ref no injection target is specified
> -----------------------------------------------------------
>
> Key: EJBTHREE-1858
> URL: https://jira.jboss.org/jira/browse/EJBTHREE-1858
> Project: EJB 3.0
> Issue Type: Bug
> Components: core
> Affects Versions: 1.1.7
> Reporter: Wolfgang Knauf
> Assignee: jaikiran pai
> Fix For: 1.1.9
>
> Attachments: ResourceEnvRefNPE.jar
>
>
> If an ENC entry for java:/comp/EJBContext is declared and NO injection target is specified, this results in a NPE.
> <resource-env-ref>
> <resource-env-ref-name>EnvNameOfSessionContext</resource-env-ref-name>
> <resource-env-ref-type>javax.ejb.SessionContext</resource-env-ref-type>
> <mapped-name>java:comp/EJBContext</mapped-name>
> </resource-env-ref>
> The exception is:
> ...
> Caused by: java.lang.NullPointerException
> at org.jboss.injection.InjectionUtil.createInjectors(InjectionUtil.java:105)
> at org.jboss.injection.ResourceHandler.loadXmlResourceEnvRefs(ResourceHandler.java:227)
> at org.jboss.injection.ResourceHandler.loadXml(ResourceHandler.java:343)
> at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:597)
> at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:434)
> at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:543)
> ... 69 more
> Looking at the code in ResourceHandler.loadXmlResourceEnvRefs, this is the only place where the check "if(envRef.getInjectionTargets() != null)" is missing ;-).
> I will attach a sample.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list