Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot connect to ORB with tnameserv

843793Jun 5 2003 — edited Mar 28 2005
Hello,

I've a problem with a small sample RMI-IIOP application under Windows 2000. The same program runs well under Linux (with the same JDK 1.3.1_08). Under Windows, the following exception occurs, while the server creates a new initial context with
Context initialNamingContext = new InitialContext();

KeyServerImpl err: Cannot connect to ORB
javax.naming.CommunicationException: Cannot connect to ORB. Root Exception is org.omg.CORBA.COMM_FAILURE: minor code: 1398079490 completed: No
at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(IIOPConnectio
n.java:914)
at com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.jav
a:975)
at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStre
am.java:71)
at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequest
Impl.java:82)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.
java:153)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNa
mingClient.java:195)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialRefe
rences(InitialNamingClient.java:260)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_r
eferences(InitialNamingClient.java:183)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.ja
va:1456)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:276)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:251)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:188)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:68)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.ja
va:30)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
60)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241
)
at javax.naming.InitialContext.init(InitialContext.java:217)
at javax.naming.InitialContext.<init>(InitialContext.java:173)
at xxx.yyy.keytool.KeyServerImpl.main(KeyServerImpl.java:48)


I start the server program in the following way:

C:\user\xyz\classes>java -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory -Djava.naming.provider.url=iiop://localhost:900 xxx.yyy.keytool.
KeyServerImpl

The Nameserver is started with

tnameserv.exe


As I told you above, the exact same code runs well under Linux (with both the tnameserv and the server code are running under Linux). I've tried to change localhost in the url to the real hostname and to the IP-Address. I also tried to grant all permissions with the policytool.
At last I tried to connect from the Windows machine to the tnameserv running under Linux - but nothing helps.

It's interesting, that the server program under Linux brings the same exception when it tries to use a tnameserv running under Windows. So it seems, that the tnameserv under Windows is one part of the problem. The output of "netstat -a" under Windows shows the correct listening port 900 bind at address 0.0.0.0.

Has someone any idea what's wrong ?

Thanks in advance,
Frank
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 25 2005
Added on Jun 5 2003
2 comments
536 views