我正在尝试创建一个使用 CORBA 进行交互的 java 客户端/服务器应用程序。我遵循了这个示例,并能够使用“Java IDL 对象请求代理守护程序,orbd”使其工作。但是,当我将服务器更改为指向我们的本地omniNames 安装而不是orbd 时,我收到此错误:
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 ...
导致错误的行:
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
就 omniNames 服务器而言,我知道它已正确安装和配置,因为我们有无数其他应用程序已经在使用它 (c++)。我查看了这些其他应用程序的源代码,它们似乎在做同样的事情:
tmpRef = moOrb->resolve_initial_references("NameService");
我知道这不是网络错误,因为如果我使用错误的端口,则会出现无连接错误。我已经走到了尽头,有什么想法吗?