users@glassfish.java.net

Problem with remote EJB client

From: <glassfish_at_javadesktop.org>
Date: Thu, 12 Feb 2009 05:32:26 PST

I have a standalone EJB client with all the necessary JAR files in the classpath. My initial context lookup looks like this:

try {
  bootstrap = (IBootstrapRemote)new InitialContext().lookup(IBootstrapRemote.class.getName());
} catch (NamingException e) {
  throw new EJBException(e);
}

This works fine as long as my server is running locally. To communicate with a server running remotely, I add the following VM parameter:

-Dorg.omg.CORBA.ORBInitialHost=192.168.14.75

Using the Sysinternals TCP viewer, I can see my client connecting to port 3700 on 192.168.14.75. However, it then attempts to connect to port 3700 on localhost, which fails because there's nothing running there.

It appears to me that the name lookup is succeeding (that's the initial connection to the remote machine) but that binding to the object is failing because the object IOR contains a reference to localhost, not to the remote machine. What do I need to configure in the server to allow remote connections to succeed?

Here's the exception, trimmed to the point of the lookup:

12-Feb-2009 7:47:08 AM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
        at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
        at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
        at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
        at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
        at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
        at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
        at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
        at com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:247)
        at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:205)
        at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
[Message sent by forum member 'kdeanddd' (kdeanddd)]

http://forums.java.net/jive/thread.jspa?messageID=331539