• Post Reply Bookmark Topic Watch Topic
  • New Topic

invoking stateless session bean

 
sri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi how to invoke a stateless session bean from a java class. im getting a naming excpetion.
It is as follows


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
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(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:292)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at itso.mighty.ejbclient.InquireParts.main(InquireParts.java:101)


help would be greatly useful. im using wsad 5.0 and was application server.
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where dose your java class redise.
Do both ur EJB and java file reside in same container?

I guess the problem is with JNDI. It is not able to get the Initial Context. If your java program is somewhere in other JVM, then U have to specify where your JNDI reside using Properties and Env variables.

I am not sure what could be the property values for Websphere. May be u can google to get those values.

Hope this helps
Saritha
 
Justin joseph
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if u r calling from outside the container, give app servers initial context factory as param fro lookup
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!