• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem with bean looup

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check JNDI name in Deployment Descriptor of EJB.
Make sure you have deployes the EJB by checking log file.

Shriniwas
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure you have deployed the EJB by checking log file.

Shriniwas
 
prasad kulkarni
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the log file located?
How to check it?
 
Liar, liar, pants on fire! refreshing plug:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic