[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-1889) @EJB injection into @Service bean leads to NullPointerException when injected bean is redepolyed
Mike Clark (JIRA)
jira-events at lists.jboss.org
Fri Aug 14 17:36:26 EDT 2009
@EJB injection into @Service bean leads to NullPointerException when injected bean is redepolyed
------------------------------------------------------------------------------------------------
Key: EJBTHREE-1889
URL: https://jira.jboss.org/jira/browse/EJBTHREE-1889
Project: EJB 3.0
Issue Type: Bug
Affects Versions: 1.1.10
Reporter: Mike Clark
Attachments: EJBAnnotationTest.zip
I have two @Service jars, service "A" and "B" where "B" injects an instance of "A" using the @EJB annotation with a mappedName attribute set to the default jndi location of A ("EJBTestAService/local" in the example provided.) When deployed, they work fine. But, if "A" is redeployed, access to "B" fails due to a NullPointerException, the reference to "A" is null.
To reproduce with the attached code:
1.) Set jboss.home property in build.xml
2.) Start EAP 5, beta
3.) ant deployAll (will compile and deploy the two jars)
4.) ant run (runs test client against "B")
5.) ant undeployA (Should see "B" stop, then "A" stop)
6.) ant deployA (Should see "A" start, then "B" start)
7.) ant run (will fail with NullPointerException as root cause)
--
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