最近,在我必须维护的非常老的应用程序的CORBA通讯期间,我遇到了问题。
客户端和服务器部分通过CORBA进行通信。从服务器上客户端的特定功能调用中,我得到
下列错误:
Not successful call - original stacktrace
java.lang.Exception
at de.tc.app.lamo.bss.util.dialog.AbstractCallProxy.<init>(AbstractCallProxy.java:135)
at de.tc.app.lamo.bss.util.dialog.CallProxy.<init>(CallProxy.java:68)
at de.tc.app.lamo.bss.util.dialog.BasisCtl.initiateServerCall(BasisCtl.java:186)
at de.tc.app.lamo.bss.util.dialog.BasisCtl.initiateServerCall(BasisCtl.java:198)
at de.tc.app.lamo.bss.dialog.stz.STZCtl.funcLesen(STZCtl.java:106)
at de.tc.app.lamo.bss.dialog.stz.STZView$1.actionPerformed(STZView.java:163)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:492)
at javax.swing.JTextField.postActionEvent(JTextField.java:705)
at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:820)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1639)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2859)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2894)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2822)
at java.awt.Component.processEvent(Component.java:6074)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1856)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:722)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1000)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:865)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:686)
at java.awt.Component.dispatchEventImpl(Component.java:4532)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:627)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:641)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception Serveraufruf: de.tc.app.lamo.awf.stub.Corba_St_STZAwf.lese
org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 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.inprise.vbroker.orb.SE.read(Unknown Source)
at com.inprise.vbroker.orb.DelegateImpl.handleReply(Unknown Source)
at com.inprise.vbroker.orb.DelegateImpl.invoke(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at de.tc.app.lamo.awf.corba._STZAwfStub.lese(_STZAwfStub.java:272)
at de.tc.app.lamo.awf.stub.Corba_St_STZAwf.lese(Corba_St_STZAwf.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at de.tc.app.lamo.bss.util.dialog.AbstractCallProxy.call(AbstractCallProxy.java:145)
at de.tc.app.lamo.bss.util.dialog.AbstractCallProxy.doCall(AbstractCallProxy.java:431)
at de.tc.app.lamo.bss.util.dialog.AbstractCallProxy.run(AbstractCallProxy.java:346)
at de.tc.app.lamo.bss.util.dialog.CallProxy.run(CallProxy.java:141)
at java.lang.Thread.run(Thread.java:662)
该错误是可重现的。在调试期间,我可以看到数据照常由后端加载,并到达客户端。
客户端实际上获得了响应,但无法处理数据。
相同的函数调用适用于其他数据。只有一些特定的数据选择没有通过。
我无法检测到这些数据之间的任何显着差异。 idl定义也未更改。
您对我有什么提示,在哪里寻找错误原因?
最佳答案
关于朋友的建议,如果服务器和客户端使用不同的lib版本,则会抛出org.omg.CORBA.MARSHAL。
我无法解释它如何发生在我的项目中,尽管如此,这个特定的错误还是消失了:-/
在我的情况下,实际的问题是org.omg.CORBA.BAD_PARAM异常,它是由以下代码行引起的:
public static void write (final org.omg.CORBA.portable.OutputStream _output, final de.tc.app.lamo.comm.STZFlugereignis _vis_value) {
...
_output.write_string((java.lang.String)_vis_value.flugNr);
...
}
其中
_vis_value.flugNr
为空。因此,实际上是一个NullPointerException,但由VisiBroker在CORBA-Exception下与相关的堆栈跟踪一起隐藏了。
关于java - org.omg.CORBA:MARSHAL和org.omg.CORBA.BAD_PARAM错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36160768/