Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in accessing EJB from application client  RSS feed

 
Deepak Pansheriya
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I ahve build EJB and deployed it successfuly. then i test it in webapplication it works. but when i ause same EJB from application client it gives error like this:

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
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.zoo.TigerUtil.lookupHome(TigerUtil.java:22)
at com.zoo.TigerUtil.getHome(TigerUtil.java:42)
at com.deep.ZooClient.main(ZooClient.java:21)
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepak,

My guess is that your standalone client doesn�t initialize the initial context properly. Usually standalone clients need to specify context specific environment variable, which are not required for clients running within your app server (because the server itself will initialize these variables).
Check if you use a code similar to this in your client:

Regards.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!