[omniORB] Problem with omniNames and JDK initial references

Michael Carland michael.carland@nvs.com
Tue, 27 Mar 2001 15:12:07 -0600


Duncan Grisby wrote:

> On Monday 26 March, Michael Carland wrote:
> 
> 
>> 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
> 
> 
> This is a well-known Java bug:
> 
>   http://developer.java.sun.com/developer/bugParade/bugs/4351366.html
> 
> I believe the problem only occurs if the Java ORB thinks the naming
> server is on the same machine as itself. If you play games with the
> hostname in the omniNames object reference, you can avoid the bug.
> 
> The best solution is to use a decent Java ORB, rather than the
> built-in one.

Duncan,
After reading this list for the last week, you've fianally broken me
down! I went and downloaded another Java ORB (JacORB).

JacORB's list of features claims compatability with the
OMG Interoperable Naming Service. Yet when I swap in the latest version 
of JacORB for the JDK ORB, and try to use my reference to omniNames, I 
also receive an ArrayIndexOutOfBoundsException, nearly identical to the 
one I get with the JDK ORB, but from the JacORB classes:

java.lang.ArrayIndexOutOfBoundsException
        at org.jacorb.orb.CDRInputStream._read4int(CDRInputStream.java:132)
        at org.jacorb.orb.CDRInputStream.read_long(CDRInputStream.java:405)
        at org.omg.CosNaming.BindingListHelper.read(BindingListHelper.java:33)
        at org.omg.CosNaming.BindingListHelper.extract(BindingListHelper.java:43)
        at org.omg.CosNaming._NamingContextStub.list(_NamingContextStub.java:209)

although this is starting with list(), and the Java ORB was throwing out 
of resolve().

Any suggestions?

I'd also like to thank all of you that work on omniORB for a great 
package. I have spent the last weeks researching various ORBs, and 
trying to get them to interoperate. Being new to CORBA (and C++, I have 
been doing Java the last 4 years), I am surprised at how difficult this 
has been. But I have made great progress with omniORB, the documentation 
is excellent, and information on the mailing list is 100 times better 
than the support I have been getting from a commercial ORB vendor. Thank 
you very much.

-Michael