943,944 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 7159
  • Java RSS
Feb 26th, 2007
0

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

Expand Post »
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 .


Java Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 10
Solved Threads: 6
Junior Poster in Training
parthiban is offline Offline
80 posts
since Sep 2006
Feb 26th, 2007
0

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

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).
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Cast an object arriving at a socket
Next Thread in Java Forum Timeline: java





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC