Error in EJB client program (javax.naming.NoInitialContextException)

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2006
Posts: 80
Reputation: parthiban is an unknown quantity at this point 
Solved Threads: 6
parthiban's Avatar
parthiban parthiban is offline Offline
Junior Poster in Training

Error in EJB client program (javax.naming.NoInitialContextException)

 
0
  #1
Feb 26th, 2007
Hi folks ,

I'm new to j2ee programming and using Netbeans 5.5 , i created a session bean program and deployed successfully in JOnAS application server but i'm not able to run the client program which invokes session bean (EJB module ).

when i run client program i'm getting the following error .


  1. javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
  2. at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
  3. at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
  4. at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
  5. at javax.naming.InitialContext.lookup(InitialContext.java:351)
  6. at SimpleSessionClient.Main.main(Main.java:33)
  7. BUILD SUCCESSFUL (total time: 21 seconds)


but the same program runnig perfectly when i deploy in Java System Application Server(8.2(JSAS))

I included j2ee.jar and appserv-rt jar in classpath of client program for JSAS i don't know what are the jar files (which does the same function as j2ee.ar,appserv-rt.jar ) which is to be included for JOnAS .

i'm struggling with this for the past two weeks . please tell me the solution .

Thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Error in EJB client program (javax.naming.NoInitialContextException)

 
0
  #2
Feb 26th, 2007
You'll need to find those application specific client files AND the application specific environment setting you need for that server.
I can't help you with that, but the server documentation should be a logical first step.

Then there's the internet, especially the vendor suppost site (most of which have forums and/or wikis of some sort).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum


Views: 4677 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC