调用 ORB.string_to_object 时 ORB.getPresentationManager 出现 NullPointerException
NullPointerException in ORB.getPresentationManager when calling ORB.string_to_object
诚然,我是 CORBA 和使用 ORB 的新手。我有一些代码安装在使用 TAO ORB 1.3 版的第 3 方机器上。当我的代码调用时:
String myObjectString = "IOR:010000002d00000049444c3a637573732e696174612e6f72672f436f6d706f6e656e74732f4d656469614f75747075743a312e3000000000030000000000000038000000010102000a0000006c6f63616c686f737400204e1b00000014010f00525354a90b6c57ea3c060002000000010000000300000000000000000000000038000000010102000a0000006c6f63616c686f737400214e1b00000014010f00525354a90b6c57ea3c060002000000010000000300000000000000000000000038000000010102000a0000006c6f63616c686f737400224e1b00000014010f00525354a90b6c57ea3c06000200000001000000030000000000000000";
ORB.string_to_object(myObjectString);
我遇到异常:
java.lang.NullPointerException
at com.sun.corba.se.spi.orb.ORB.getPresentationManager(Unknown Source)
at com.sun.corba.se.spi.orb.ORB.getStubFactoryFactory(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_Object(Unknown Source)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.getIORFromString(Unknown Source)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(Unknown Source)
at com.sun.corba.se.impl.orb.ORBImpl.string_to_object(Unknown Source)
at CussClient.enableMediaOutput(CussClient.java:1232)
at CussClient.ActivateComponents(CussClient.java:1879)
at CussClient.setApplicationState(CussClient.java:268)
at CussClient.HandleEvent(CussClient.java:2425)
at evtListenerImpl.callback(evtListenerImpl.java:31)
at types.evtListenerPOA._invoke(evtListenerPOA.java:49)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(Unknown Source)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(Unknown Source)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)
同样的代码适用于其他第 3 方机器 运行 其他 ORB,所以我不确定这是 TAO ORB 的问题还是其他问题。有没有ORB高手能告诉我为什么会这样?
这最终是由安装在第 3 方计算机上的 JRE 版本引起的。
这与航空业 CUSS(通用自助服务)1.3 版要求有关,该要求规定了需要安装的 Java 版本。在 CUSS 文档中,它声明 Java 1.7.0_21 及更高版本是允许的。在 Errata 文档中,它被更改为需要 Java 1.7.0_21 具体来说。
诚然,我是 CORBA 和使用 ORB 的新手。我有一些代码安装在使用 TAO ORB 1.3 版的第 3 方机器上。当我的代码调用时:
String myObjectString = "IOR:010000002d00000049444c3a637573732e696174612e6f72672f436f6d706f6e656e74732f4d656469614f75747075743a312e3000000000030000000000000038000000010102000a0000006c6f63616c686f737400204e1b00000014010f00525354a90b6c57ea3c060002000000010000000300000000000000000000000038000000010102000a0000006c6f63616c686f737400214e1b00000014010f00525354a90b6c57ea3c060002000000010000000300000000000000000000000038000000010102000a0000006c6f63616c686f737400224e1b00000014010f00525354a90b6c57ea3c06000200000001000000030000000000000000";
ORB.string_to_object(myObjectString);
我遇到异常:
java.lang.NullPointerException
at com.sun.corba.se.spi.orb.ORB.getPresentationManager(Unknown Source)
at com.sun.corba.se.spi.orb.ORB.getStubFactoryFactory(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_Object(Unknown Source)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.getIORFromString(Unknown Source)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(Unknown Source)
at com.sun.corba.se.impl.orb.ORBImpl.string_to_object(Unknown Source)
at CussClient.enableMediaOutput(CussClient.java:1232)
at CussClient.ActivateComponents(CussClient.java:1879)
at CussClient.setApplicationState(CussClient.java:268)
at CussClient.HandleEvent(CussClient.java:2425)
at evtListenerImpl.callback(evtListenerImpl.java:31)
at types.evtListenerPOA._invoke(evtListenerPOA.java:49)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(Unknown Source)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(Unknown Source)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)
同样的代码适用于其他第 3 方机器 运行 其他 ORB,所以我不确定这是 TAO ORB 的问题还是其他问题。有没有ORB高手能告诉我为什么会这样?
这最终是由安装在第 3 方计算机上的 JRE 版本引起的。
这与航空业 CUSS(通用自助服务)1.3 版要求有关,该要求规定了需要安装的 Java 版本。在 CUSS 文档中,它声明 Java 1.7.0_21 及更高版本是允许的。在 Errata 文档中,它被更改为需要 Java 1.7.0_21 具体来说。