-
Bug
-
Resolution: Done
-
Major
-
16.0.0.Final, 17.0.0.Beta1, 17.0.1.Final
-
None
EJB Bean with mappedName is not binding , the mappedName is vendor specific, it is not portable, however @EJB(mappedName=...) is expecting a global JNDI path, but @Stateless(mappedName=...) does not appear to be binding anything.
@Stateless(name="HelloBean", mappedName="MappedHelloBean") public class HelloBean implements Hello { ...
@Startup @Singleton public class TestSingleton { @EJB(mappedName="MappedHelloBean") private Hello ejb; ...
So the @EJB causes the TestSingleton to fail.
22:12:55,637 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 72) MSC000001: Failed to start service jboss.deployment.unit."mapped-name.jar".component.TestSingleton.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."mapped-name.jar".component.TestSingleton.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance ... Caused by: javax.ejb.EJBException: java.lang.RuntimeException: WFLYNAM0059: Resource lookup for injection failed: env/com.jboss.examples.ejb.TestSingleton/ejb ... Caused by: java.lang.RuntimeException: WFLYNAM0059: Resource lookup for injection failed: env/com.jboss.examples.ejb.TestSingleton/ejb ... Caused by: javax.naming.NamingException: WFLYNAM0062: Failed to lookup env/com.jboss.examples.ejb.TestSingleton/ejb [Root exception is java.lang.RuntimeException: javax.naming.NameNotFoundException: MappedHelloBean -- service jboss.naming.context.java.MappedHelloBean] ... Caused by: java.lang.RuntimeException: javax.naming.NameNotFoundException: MappedHelloBean -- service jboss.naming.context.java.MappedHelloBean ... Caused by: javax.naming.NameNotFoundException: MappedHelloBean -- service jboss.naming.context.java.MappedHelloBean ...
[1] https://docs.oracle.com/javaee/6/api/javax/ejb/EJB.html#mappedName()
- clones
-
JBEAP-16724 [GSS](7.2.z) EJB Bean with mappedName is not binding
- Closed