Question

I'm trying to create a java client/server application that uses CORBA to interact. I followed this example and was able to get it to work using the 'Java IDL Object Request Broker Daemon, orbd'. But when I change the server to point at our local omniNames install instead of orbd, I get this error:

C:\Hello>java HelloServer -ORBInitialPort 7000 -ORBInitialHost 192.168.1.5
ERROR: org.omg.CORBA.OBJECT_NOT_EXIST:   vmcid: OMG  minor code: 1  completed: No
org.omg.CORBA.OBJECT_NOT_EXIST:   vmcid: OMG  minor code: 1  completed: No
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_0.getSystemException(ReplyMessage_1_0.java:94)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
        at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:452)
        at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:339)
        at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
        at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.invoke(BootstrapResolverImpl.java:89)
        at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.resolve(BootstrapResolverImpl.java:107)
        at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22)
        at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22)
        at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22)
        at com.sun.corba.se.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1151)
        at HelloServer.main(HelloServer.java:51)
HelloServer Exiting ...

The line that is causing the error:

org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");

As far a the omniNames server goes, I know its installed and configured properly since we have countless other applications that are already using it (c++). I've looked at the source code of these other apps and they appear to be doing the same thing:

tmpRef = moOrb->resolve_initial_references("NameService");

I know its not a network error, because if I use the wrong port a get a no-connection error. I'm at the end of my rope, any ideas?

Was it helpful?

Solution

The problem ended up being between my java server and my CORBA server. I'm using omniNames as as the CORBA server (part of omniOrbs). Apparently java has a non-standard bootstrap which isn't compatible with omniNames by default. To enable support for the java bootstrap, omniNames can be started with the argument:

'-ORBsupportBootstrapAgent 1'

Everything works fine after adding that. More can be read here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top