Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NameNotfoundException in JONAS

 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I am trying sample stateless session bean on JOnAS server.It is deployed sucessfully.But when i try to connect from stand alone java program it is throwing NameNotfoundException.

I checked in console of JOnAS the bean is available.But still why it is throwing NameNotfoundException.

I hope may be any error in client program.here is my client program



Is there any error in my properties, that i added in intial context.

Thanks in advance
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exception thrown is client program is
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
initCtx.lookup("ejb/Sess")


Is this the jndi name of the local reference or a remote reference? The reason i ask is, you *cannot* lookup a local reference from outside the same JVM(in your case standalone application).
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi jaikiran pai

Thank you for your response.It is remote reference only.

My problem is solved when i changed ejb/Sess to Sess in both client program and server xml file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic