Skip to Content
author's profile photo Former Member
Former Member

INITIAL_CONTEXT_FACTORY, PROVIDER_URL and URL_PKG_PREFIXES

Hello!!

I hope that you can help me. What are the values of these three environment varibles? I have a problem when I create a new InitialContext .. what is wrong? This is my code :

Hashtable env = new Hashtable();

env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");

env.put(javax.naming.Context.PROVIDER_URL, "localhost:50004");

env.put(javax.naming.Context.URL_PKG_PREFIXES, "com.sap.tm.jndi.providers");

Context ctx = new InitialContext(env);

In this moment appears the following error :

com.sap.engine.services.jndi.persistent.exceptions.NamingException: Intermediate context : ejb was not found

at com.sap.engine.services.jndi.implserver.ServerContextImpl.getLastContainer(ServerContextImpl.java:261)

at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:562)

at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:326)

at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:222)

at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:236)

at javax.naming.InitialContext.lookup(InitialContext.java:347)

at javax.naming.InitialContext.lookup(InitialContext.java:347)

Thanks.

Carlos

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2005 at 02:58 PM

    Hi Carlos,

    your parameters are right. It seems like a wrong JNDI name into the call of the lookup method for finding an EJB. Check this and make you sure this element is existing into your JNDI.

    Regards André

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.