-
1. Re: Can not find EJB component - JNDI javax.naming.NameNotFoundException
jewellgm Sep 29, 2017 12:20 PM (in response to micanti)It looks like your lookup name is incorrect. Wildfly is telling you that it's deploying the EJB with name
java:global/myApp/myApp-ejb/MyEjbModule!com.ejb.service.MyEJBLocal
But you're looking for
java:global/myApp.ear/myApp.ear/myApp-ejb.jar/MyEjbModule!com.ejb.service.impl.MyEjbModule
Your "app" variable looks like it's resolving to "myApp.ear/myApp". Can you not modify your lookup to match what Wildfly is telling you the lookup name is?
Alternatively, you can tell Wildfly what you want the lookup name to be by modifying the annotation on the class marking it as an EJB (eg. @Stateless(mappedName="...") ).
-
2. Re: Can not find EJB component - JNDI javax.naming.NameNotFoundException
micanti Oct 2, 2017 2:58 AM (in response to micanti)Perfect. I was using the path as from file system from previous tests.
It works now. Thank you for your reply !
(By the way, there's a mistake in my initial post, when looking up for the ejb, the correct syntax is :
MyEjbLocal myEjb
= (MyEjbLocal) context.lookup(ejbJndiLocation);)