org.omg.CORBA:MARSHAL & org.omg.CORBA.BAD_PARAM 错误
Posted
技术标签:
【中文标题】org.omg.CORBA:MARSHAL & org.omg.CORBA.BAD_PARAM 错误【英文标题】:org.omg.CORBA:MARSHAL & org.omg.CORBA.BAD_PARAM error 【发布时间】:2016-03-22 17:04:13 【问题描述】:最近我在 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 定义也没有改变。
你有什么提示给我,到哪里寻找错误原因?
【问题讨论】:
这是整个堆栈跟踪吗? 你好约翰,我将整个堆栈跟踪添加到我的帖子中。现在有什么想法吗? 【参考方案1】:根据朋友的建议,如果服务器和客户端使用不同的 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 下以及相关的堆栈跟踪。
【讨论】:
【参考方案2】:确保客户端和服务器上所有依赖项(jar 文件)的版本相同。
确保客户端和服务器运行相同版本的 Java?
【讨论】:
你好 John,Client 和 Server 都是用 Java 6 编译的。Server 在 Java 7 上运行。Client 是通过 Java Web Start 加载的,所以我对 Client JRE 没有任何影响。我必须支持 Java 6。到现在为止都不是问题。前段时间,我获取要在客户端中显示的数据的 Web 界面被扩展了。但它不应该影响 CORBA 通信。我不知道在哪里搜索了。以上是关于org.omg.CORBA:MARSHAL & org.omg.CORBA.BAD_PARAM 错误的主要内容,如果未能解决你的问题,请参考以下文章
上班时间 下班时间 8:30AM 5:30PM 7:30AM 10:30PM 1:30AM 10:00PM 4:30AM 12:00PM 8:00AM 5:00PM 7:00AM 1