Can't lookup EJB
546634Jan 14 2011 — edited Mar 30 2011Hi,
I installed Oracle Enterprise Pack for Eclipse, and Weblogic 11g R1. Then I added Weblogic as deployment server "embedded" in the IDE.
After creating a Enterprise project with Web and EJB modules, I created a Stateless session bean, with a local interface.
In the bean i use:
@Stateless (name=""myEJB")
In the Locafacade i use:
@Local
Then I added a reference in the web.xml :
<ejb-local-ref>
<ejb-ref-name>ejb/bean-name</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>com.oracle.MyEJBLocal</local>
<ejb-link>myEJB</ejb-link>
</ejb-local-ref>
In an Business delegator in the WEB module I used --> @EJB (name="ejb/bean-name") MyEJBLocal lcejb;
then I tried to call a method like this: lcejb.amethod();
After cleaning and building i added the module on the Weblogic server and started in debug mode and published.
No errors during startup or publish.
But when i debug i can see that the lcejb is null, which means it could not find the EJB ? Or am i missing something?