cancel
Showing results for 
Search instead for 
Did you mean: 

INITIAL_CONTEXT_FACTORY, PROVIDER_URL and URL_PKG_PREFIXES

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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é