permaculture playing cards*
The moose likes EJB and other Java EE Technologies and the fly likes Problem with bean looup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem with bean looup" Watch "Problem with bean looup" New topic
Author

Problem with bean looup

prasad kulkarni
Ranch Hand

Joined: Mar 19, 2006
Posts: 66
I have deployed a EJB on serve1 & trying to looup it from server2 placed on same machine. ( server1 & server2 are test environments of websphere). I have the following code in servlet of server2

hashtable.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
hashtable.put(Context.PROVIDER_URL, "iiop://localhost:2810/");
Context context = new InitialContext(hashtable);
context.lookup("ejb/com/ejb/MyEJBHome"); // MyEJBHome is deployed in server1

when this code excutes I have exception "javax.naming.NameNotFoundException: ejb/com/ejb/QqqHome. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound". What are the exact parameters that I should provide for Context.INITIAL_CONTEXT_FACTORY & Context.PROVIDER_URL so that I will not have the exception.


scjp, scwcd
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Check JNDI name in Deployment Descriptor of EJB.
Make sure you have deployes the EJB by checking log file.

Shriniwas
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Make sure you have deployed the EJB by checking log file.

Shriniwas
prasad kulkarni
Ranch Hand

Joined: Mar 19, 2006
Posts: 66
Where is the log file located?
How to check it?
 
 
subject: Problem with bean looup
 
Similar Threads
ejb lookup problem on diff servers
How to use an EJB, deployed in another server?
lookup code in ejb2.1
ejb lookup problem on diff servers
IBM RAD 7 EJB lookup failure, NameNotFoundException