Error trying to connect to Jacorb naming service

I hope to get some help on this strange problem. We are launching the Jacorb name server, and I have a simple client that I use to try to connect and make awesome CORBA voodoo. The name server is running, but when I try to start the java application, I get "Connection failure" error (org.omg.CORBA.COMM_FAILURE, minor code 201, "caused by java.net.ConnectionException: Connection refused: connect").

Here's the weird part. The error reports that it is trying to connect using the default port of 900, but I am passing an argument to try to redefine the name service port number according to the one used by the name server. My java command looks like this:

java -classpath . HelloClient -Djava.endorsed.dirs="bla bla bla" <br>
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB 
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
-DORBInitRef.NameService=corbaloc::localhost:2809/StandardNS/NameServer-POA/_root

I also tried the parameters without the first capital D (I saw this in both directions, and I do not know the difference).

Now, if I put in -ORBInitialPort 2809, then the client is really trying to connect, but then I get an error corba.OBJECT_NOT_EXIST.

I could use any help or advice anyone has.

+5
source share
2 answers

Disconnected. This sounds like a problem with the firewall / program. try it telnet <machine> 2809. You should get a "Connected to" link, and not a failure if everything works correctly.

I work on a UNIX client, so the paths use the UNIX style.

  • jacORB ? orb.properties( ${JAVA_HOME}/jre/lib/ "ORBInitRef.NameService=corbaloc::localhost:2809/NameServer" "NameServer" , "...."

    UNIX (.. e:\NS_Ref → /tmp/NS_Ref) jacorb.naming.ior_filename=/tmp/NS_Ref

1. http://    .

1b. . ns :   ns -DOAPort=2809

: 2010-05-27 10:00:47.777 FINE Created socket listener on 0.0.0.0/0.0.0.0:2809 2010-05-27 10:00:47.777 FINE Using port 2809 : $ lsof | grep 2809 java 27529 jbsymolo 15u IPv6 693300 TCP *:2809 (LISTEN) $ lsof -Pnl +M -i6 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME Naming_Se 9678 1000 7u IPv6 45779 TCP *:51148 (LISTEN) java 27959 1000 15u IPv6 696092 TCP *:2809 (LISTEN)

: ( )

  1. ns , , . .

  2. VM. -D . Java- , System.getProperty(). "-D", D.

    -DORBInitRef.NameService = corbaloc:: : 2809/ -Dorg.omg.CORBA.ORBclass= org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonclass= org.jacorb.orb.ORBSingleton

Eclipse :

May 27, 2010 10:01:06 AM org.jacorb.config.JacORBConfiguration init
INFO: base configuration loaded from file /usr/lib/java/jdk1.6.0_18/jre/lib/orb.properties
...
2010-05-27 10:01:09.836 FINE Trying to connect to 127.0.0.1:2809 with timeout=90000.
2010-05-27 10:01:09.844 INFO Connected to 127.0.0.1:2809 from local port 45745
2010-05-27 10:01:09.846 FINE wrote 12 bytes to 127.0.0.1:2809
...

/

+3

, , , InitRef:

-DORBInitRef.NameService=corbaloc::localhost:2809

, , NameContext, .

+1

All Articles