File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes javax.naming.NamingException while lookup for JNDI Name of EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "javax.naming.NamingException while lookup for JNDI Name of EJB" Watch "javax.naming.NamingException while lookup for JNDI Name of EJB" New topic
Author

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

Hitesh Kumar Modi
Greenhorn

Joined: Aug 31, 2011
Posts: 4

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

Joined: Nov 02, 2011
Posts: 35

After deployment, go to deployed module.
Open its properties and set the JNDI name for the EJB.
Hitesh Kumar Modi
Greenhorn

Joined: Aug 31, 2011
Posts: 4

I have already given JNDI name as "app/advice".....
Kiran Yadav
Ranch Hand

Joined: Nov 02, 2011
Posts: 35

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.



[Thumbnail for serverConfig.JPG]

Hitesh Kumar Modi
Greenhorn

Joined: Aug 31, 2011
Posts: 4

I have already done that, bro!


[Thumbnail for config.png]

Kiran Yadav
Ranch Hand

Joined: Nov 02, 2011
Posts: 35

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

Joined: Aug 31, 2011
Posts: 4

Yes, 2809 is the Boot strap port as specified in "serverindex.xml" .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.naming.NamingException while lookup for JNDI Name of EJB