Skip to Content

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

problem with initialcontext(NoInitialContextException)

hi,

i have written remote client for ejb.

Context ctx = null;

Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialReplicatingContextFactoryImpl");

env.put(Context.PROVIDER_URL, "192.168.1.100:50000");

// env.put("force_remote", true);

env.put(Context.SECURITY_PRINCIPAL, "admin");

env.put(Context.SECURITY_CREDENTIALS, "admin");

try {

ctx = new InitialContext(env);

} catch (NamingException ne) {

System.out.println(ne);

<b>exception is</b>

javax.naming.NoInitialContextException: Cannot instantiate class: com.sap.engine.services.jndi.InitialReplicatingContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialReplicatingContextFactoryImpl]

java.lang.NullPointerException

please help me to do this

regards

Guru

<b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b>

replied

Hi Guru

Log in to the visual admin as an administrator and go the

EJB Container node and check for your deployed ejb , on clicking the ejb you wil be able to get the jndi name of the deployed ejb .

Hope this helps , please do not forget to reward points

regards

rajeshkr

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