Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting the InitialContext problem

chris gandi
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: [Root exception is java.lang.ClassNotFoundException:]

the code i used is:
System.out.println("about to retrieve initial context.");
java.util.Properties p = new java.util.Properties();

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:

Thanks in advance for your help

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic