Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can't lookup EJB

546634Jan 14 2011 — edited Mar 30 2011
Hi,

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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2011
Added on Jan 14 2011
6 comments
1,579 views