| 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: 33
|
|
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: 33
|
|
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.
|
| Filename |
serverConfig.JPG |
Download
|
| Description |
test |
| Filesize |
74 Kbytes
|
| Downloaded: |
12 time(s) |
|
 |
Hitesh Kumar Modi
Greenhorn
Joined: Aug 31, 2011
Posts: 4
|
|
I have already done that, bro!
|
| Filename |
config.png |
Download
|
| Description |
|
| Filesize |
18 Kbytes
|
| Downloaded: |
7 time(s) |
|
 |
Kiran Yadav
Ranch Hand
Joined: Nov 02, 2011
Posts: 33
|
|
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" .
|
 |
 |
|
|
subject: javax.naming.NamingException while lookup for JNDI Name of EJB
|
|
|