• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.naming.NamingException while lookup for JNDI Name of EJB

 
Hitesh Kumar Modi
Greenhorn
Posts: 4
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to Websphere. I have developed a simple EJB and deployed in Websphere v8. I deployed it by creating EAR File.
Then I developed a standalone java client and trying to call ejb. But it fails while doing lookup for JNDI Name of EJB.




The Exception stack trace is:




Kindly suggest me what should I do to make it work.
Thanks in advance.
 
Kiran Yadav
Ranch Hand
Posts: 35
Eclipse IDE Firefox Browser Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After deployment, go to deployed module.
Open its properties and set the JNDI name for the EJB.
 
Hitesh Kumar Modi
Greenhorn
Posts: 4
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have already given JNDI name as "app/advice".....
 
Kiran Yadav
Ranch Hand
Posts: 35
Eclipse IDE Firefox Browser Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have accessing the EJB with JNDI name= "app/advice".

You have to map name "app/advice" to JNDI tree through Admin console. i.e. after deployment.

Please see attachment.
serverConfig.JPG
[Thumbnail for serverConfig.JPG]
test
 
Hitesh Kumar Modi
Greenhorn
Posts: 4
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have already done that, bro!
config.png
[Thumbnail for config.png]
 
Kiran Yadav
Ranch Hand
Posts: 35
Eclipse IDE Firefox Browser Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have provided provider url=corbaloc:iiop:localhost:2809,

Is it the correct port? Please verify it, as error log gives out : java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
 
Hitesh Kumar Modi
Greenhorn
Posts: 4
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, 2809 is the Boot strap port as specified in "serverindex.xml" .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic