This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

ejb lookup problem on diff servers

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to lookup a bean deployed on server2 from my client deployed on server1.
The bean is a stateless session bean with the jndi name as ejb/Ejb1Home.
I am successfully able to lookup the bean from the client residing on server2 but the client on server1 fails to locate the bean.

Here is the code used in the client on server1:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL,"corbaloc:iiop:localhost:9086");
Context ctx = new InitialContext(env);
System.out.println(ctx+"****####");
Ejb1Home home1 = (Ejb1Home)ctx.lookup("ejb/Ejb1Home");

Since both the servers are running on the same machine (WSAD) i have used localhost.But the bootstrap port of server2 is 9086 whereas bootstrap of server1 is 2089.

This is the error i am getting on lookup:
javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: ejb/Ejb1Home: First component in name ejb/Ejb1Home not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0

Any pointers will be highly appreciated.

PS:I had posted this problem by mistake on websphere forum previously.
 
reply
    Bookmark Topic Watch Topic
  • New Topic