Here is a simple demo of calling an EJB3 Stateless bean through another EJB3 bean which is reside inside the same EAR file. To refer to a Local EJB using @EJB annotation we must use the Tag <ejb-local-ref> inside our “ejb-jar.xml” as described in the following post.

Many times we get following kind of error at the time of Deploying the application while using @EJB annotation…

Caused By: javax.naming.NameNotFoundException: While trying to look up ejb-info

Which usually happens because our deployment descriptors are not configured properly to lookup a Local Bean and when the WebLogic Container tries to inject the Local EJB in to another Bean/WebApplication it fails due. Example: