0



我在使用 CORBA ACE/TAO 时遇到了一个奇怪的异常。我正在尝试运行一个用 Java 编写的服务来发送/接收来自客户端的消息。当我在 Windows 7 32 位中运行相同的代码时,它工作正常!我导出了一个可执行的 jar 文件并尝试在我的 mac 上运行它,但问题仍然存在。我得到的例外如下:

Dec 7, 2011 6:43:52 AM com.sun.corba.se.impl.naming.namingutil.CorbalocURL badAddress
WARNING: "IOP00110603: (BAD_PARAM) Bad host address in -ORBInitDef"
org.omg.CORBA.BAD_PARAM:   vmcid: SUN  minor code: 603  completed: No
    at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:148)
    at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:166)
    at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.badAddress(CorbalocURL.java:104)
    at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.handleColon(CorbalocURL.java:140)
    at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.handleIIOPColon(CorbalocURL.java:115)
    at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.<init>(CorbalocURL.java:67)
    at com.sun.corba.se.impl.naming.namingutil.INSURLHandler.parseURL(INSURLHandler.java:41)
    at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:114)
    at com.sun.corba.se.impl.resolver.ORBInitRefResolverImpl.resolve(ORBInitRefResolverImpl.java:31)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:20)
    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 ami.ImplRepoClient.<init>(ImplRepoClient.java:23)
    at ami.Famine.initialize(Famine.java:22)
    at ami.Famine.initialize(Famine.java:12)
    at test.Test.main(Test.java:45)
Exception in thread "main" org.omg.CORBA.BAD_PARAM:   vmcid: SUN  minor code: 603  completed: No
    at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:148)
    at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:166)
    at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.badAddress(CorbalocURL.java:104)
    at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.handleColon(CorbalocURL.java:140)
    at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.handleIIOPColon(CorbalocURL.java:115)
    at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.<init>(CorbalocURL.java:67)
    at com.sun.corba.se.impl.naming.namingutil.INSURLHandler.parseURL(INSURLHandler.java:41)
    at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:114)
    at com.sun.corba.se.impl.resolver.ORBInitRefResolverImpl.resolve(ORBInitRefResolverImpl.java:31)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:20)
    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 ami.ImplRepoClient.<init>(ImplRepoClient.java:23)
    at ami.Famine.initialize(Famine.java:22)
    at ami.Famine.initialize(Famine.java:12)
    at test.Test.main(Test.java:45)

在这两种情况下,我都使用 java 1.6。我的mac中的java版本是“build 1.6.0_29-b11-402-10M3527”

有人知道问题可能是什么吗?

谢谢,
迪莫斯。

4

1 回答 1

0

可能您的 Mac 无法解析您使用 -ORBInitDef 传递的地址。尝试手动 ping 服务器,看看是否有效。

于 2011-12-07T19:14:34.160 回答