[omniORB] Problem with omniNames and JDK initial references

Michael Carland michael.carland@nvs.com
Mon, 26 Mar 2001 22:35:51 -0600


Hello,

I thought I had this working, but am having a problem I wasn't before.

If I start omniNames with a clean logdir on port 2809, using the JDK ORB 
with "-ORBInitialPort 2809" I am able to get a list of initial 
references, which includes "NameService". But if I then call 
orb.resolve_initial_references("NameService"), an exception is thrown:

java.lang.ArrayIndexOutOfBoundsException
         at 
com.sun.corba.se.internal.util.Utility.bytesToInt(Utility.java:1032)
         at 
com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(CDRInputStream.java:600)
         at 
com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(CDRInputStream.java:572)
         at 
com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:209)
         at 
com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:265)
         at 
com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:188)
         at 
com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:1393)

If I create a dummy entry in a file omniMapper.cfg so it will not 
complain about a blank config, and then start omniMapper with: 
omniMapper -port 2809 -config ./omniMapper.cfg -ORBInitRef 
NameService=corbaloc::myhost/NameService

my test program shows "NameService" in orb.list_initial_services(), and
orb.resolve_initial_references("NameService") does not fail. I have not 
tries using the resolved name service yet.

I am fairly certain I resolve_initial_references(...) was working for me 
before. I must have broke something, but I can't think of what it could 
be. Any suggestions?

Thanks
-Michael