Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem Running Application Client on Redhat Linux 8.0

4 views
Skip to first unread message

Shivprasad Bade

unread,
May 5, 2004, 5:21:07 AM5/5/04
to
Hi,
I wrote a simple application which look up ejb on WAS app server 5.0.
I am using IBM JDK 1.4.1 on Linux and same on windows machine.
Same application works well with the Windows.
---------
sample.sh
---------
#
cp=$cp:$h/lib/websphere/bootstrap.jar
cp=$cp:$h/lib/websphere/ejbcontainer.jar
cp=$cp:$h/lib/websphere/ibmorb.jar
cp=$cp:$h/lib/websphere/iwsorb.jar
cp=$cp:$h/lib/websphere/j2ee.jar
cp=$cp:$h/lib/websphere/ns.jar
cp=$cp:$h/lib/websphere/ras.jar
cp=$cp:$h/lib/websphere/ujc.jar
cp=$cp:$h/lib/websphere/utils.jar
cp=$cp:$h/lib/websphere/websphere.jar
java -cp $cp com.test.Sample
---------------------

----------
Sample.java
----------
package com.test;
import java.util.Hashtable;
import javax.naming.*;
public class Sample
{
public static void main(String[] args)
{
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "iiop://172.17.25.12:2809");
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
try
{
Context ctx = new InitialContext(env);
Object ref = ctx.lookup("cell/nodes/pc0124/servers/server1/Sample");
System.out.println(ref);
}
catch (NamingException e)
{
e.printStackTrace();
}
}
}
---------------------------------
On Linux machine there is no firewall.Simple socket programming works
very well but when i try to run above piece of code,i get
--------------------------
javax.naming.ServiceUnavailableException: Caught exception when
resolving initial reference=NameService. Root exception is
org.omg.CORBA.TRANSIENT: java.net.SocketException: Invalid argument or
cannot assign requested address:host=172.17.25.12,port=2809 vmcid:
IBM minor code: E03 completed: No
at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:453)
at com.ibm.rmi.transport.TCPTransport.getConnection(TCPTransport.java:179)
at com.ibm.rmi.iiop.TransportManager.get(TransportManager.java:79)
at com.ibm.rmi.iiop.GIOPImpl.createRequest(GIOPImpl.java:133)
at com.ibm.rmi.iiop.GIOPImpl.createRequest(GIOPImpl.java:98)
at com.ibm.rmi.corba.ClientDelegate._createRequest(ClientDelegate.java:1937)
at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1233)
at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1253)
at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1166)
at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1219)
at com.ibm.rmi.corba.InitialNamingClient.resolve(InitialNamingClient.java:263)
at com.ibm.rmi.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:317)
at com.ibm.rmi.corba.InitialNamingClient.resolve_initial_references_remote(InitialNamingClient.java:448)
at com.ibm.rmi.corba.ORB.resolve_initial_references_remote(ORB.java:3868)
at com.ibm.rmi.iiop.ORB.resolve_initial_references_remote(ORB.java:643)
at com.ibm.CORBA.iiop.ORB.resolve_initial_references_remote(ORB.java:1529)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getCosRootContext(WsnInitCtxFactory.java:442)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:363)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:229)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:98)
at com.ibm.ws.naming.util.WsnInitCtx.<init>(WsnInitCtx.java:79)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtxFactory.java:137)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:80)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:256)
at javax.naming.InitialContext.init(InitialContext.java:232)
at javax.naming.InitialContext.<init>(InitialContext.java:208)
-------------------------------------------

Please help me with this.

Regards

Shivprasad

0 new messages