Hi all,
I am
j2ee newbee, and i am following the wsad tutorials on creating a HelloWorldEJB, All went well except when i exported the Application client and tried to run it. i get the folowing error:
Whoops! Threw a NamingException: javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory]
the code i used is:
System.out.println("about to retrieve initial context.");
java.util.Properties p = new java.util.Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.ejs.ns.jndi.CNInitialContextFactory");
p.put(Context.PROVIDER_URL, "iiop://P4L:900");
initContext = new InitialContext(p);
System.out.println("initial context has been created.");
could someone please tell me what i am doing wrong. and why it works when i run it inside wsad using the websphere v5 application client?
I have also added th efollowing jars to my classpath:
naming.jar
namingserver.jar
naminglient.jar
implfactory.jar
Thanks in advance for your help
chris