Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NameNotFoundException on using local interface

 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using JAVA-RI. I have a bean with local component and home interfaces. I have given a JNDI name for this bean. Now when I do a lookup as below:


I get the below error:
javax.naming.NameNotFoundException: HelloWorldLocal not found

I am using 2 different DOS command prompt windows. In one window is have started the J2EE server and in other I gave the command:


TIA
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all you cannot access local component with local interface from stand alone program directly.
Add application client to your bean using deploy tool and then set ejb-ref for client referring to bean.
Then run client.
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried above method which i discussed but it didn't work.So sorry for that.
Then i used SessionFacade pattern and i successfully accessed bean with local interface.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic