• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote EJB Access in WAS 5.1

 
gokul maha
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Am trying to access an remote EJB(Stateless Session bean) deployed in server1(Websphere Appication Server 5.1) and running in ORB port 2810.
I have one more server, server2(Websphere Appication Server 5.1) running in the same machine in ORB port 2809, which is trying to access the remote EJB in server1.

server2 code :-


Properties properties = new Properties();

properties.put(javax.naming.Context.PROVIDER_URL,
"IIOP://localhost:2810");
properties.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");


Contextic = new InitialContext( properties );
Object o = ic.lookup("ejb/TestSession") //jndiname in server1


I had exported the EJB client jar of the remote EJB and had build it in the class path of server2.
I started both server and when ran the application in server2, am getting the following exception.


[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: ejb/TestSession: First component in name TestSession not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:968)
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:1399)
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3491)
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1519)
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1067)
[6/27/06 19:38:18:784 IST] 7d495830 SystemErr R at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)

Please help me as am stuck up with this for a week. Let me know if you need any other information.

Thanks a lot in advance.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!