Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

NameNotFoundException during JNDI lookup

Hi !

I am really new in developing java on SAP Netweaver 7.1. In the past i used JBOSS.

Unfortunately i dont find the solution that fixes my problem in the forums here.

My problem is as follows:

I created a stateless session bean (EJB 3.0) in the developerstudio named "" and the interface "". Its only a hello world bean.

Then I deployed the WorkerEAR with the DeveloperStudio on my NetWeaver 7.1 without problems. The Netweaver stans in the local network in the company.

Now I wrote a java client to call and test the WorkerBean via remote over JNDI lookup.

The client looks this way:

public class Main {
public static void main(String[] args){
      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY, "");
      props.put(Context.PROVIDER_URL, "10.XXX.17.XXX:50004");
        Context ctx = new InitialContext(props);
        Object o = ctx.lookup("ejb:/");
        WorkerRemote ref = (WorkerRemote)PortableRemoteObject.narrow(o, WorkerBean.class);
        String msg = ref.sayHello();
        System.out.println(">>>"+ ref.sayHello());

So now I get a Error when I execute the main class:

Path to object does not exist at ejb:, the whole lookup name is ejb:/




I dont understand, where the problem is, because i did the same as described on this sap help page:

note: I dont setup any ejb-j2ee-engine.xml or application-j2ee-engine.xml because I thought its not nesscerary.

Can anybody help me please ?

Thanks in advance and sry for my english,


Former Member

Hi Henne,

I would propose you to use the simplest format of the ejb scheme lookup strings, try just:


/you are right the interface name property is the name of the EJB business interface you want to use as client view after the lookup operation/



/beanName property is the name of the bean. By default the bean name in ejb 3.0 is the bean class name (without the package)/

Best Regards,

Krasimir Topchiyski

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question