Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Websphere Naming Exception

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am new to WSAD 4.0 . I am trying to look for Seesion Bean using JNDI name.

This is my code.

ctx = new InitialContext();
Object home = ctx.lookup("LoadClassBean");
loadhome = (LoadClassBeanHome)javax.rmi.PortableRemoteObject.narrow(home, LoadClassBeanHome.class);
LoadClassBean beanremote = loadhome.create();

I am getting exception.

javax.naming.NameNotFoundException: LoadClassBean
at javax.naming.InitialContext.lookup(
at LoadServlet.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(

Can anyone suggest why i am getting exception and how to set JNDI name in WSAD.

author & internet detective
Posts: 39540
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not "ejb/SessionBeanName" for the JNDI name? Anyway, this is set on the bean tab of the ejb deployment descriptor. What kind of client are you using? You may need to set up an ejb reference.
Opportunity is missed by most people because it is dressed in overalls and looks like work - Edison. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!