java - 'org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe' 是什么意思?

标签 java ejb weblogic weblogic-10.x

调用部署在 weblogic 10.3.5 服务器上的 EJB bean 时出现非常神秘的错误。

错误是:

javax.ejb.EJBException: CORBA MARSHAL 0 Maybe; nested exception is: 
    org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe; nested exception is: org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:121)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:103)
    at $Proxy0.getOrder(Unknown Source)
    at test.EjbTest.main(EjbTest.java:37)
Caused by: org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
    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_2.getSystemException(ReplyMessage_1_2.java:99)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
    at service._OrderSession_fb3odc_OrderSessionRIntf_Stub.getOrder(Unknown Source)
    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 weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    ... 2 more

ejb 绑定(bind)是使用 wlclient.jar 创建的:

public static <T> T getRemoteEJB(String jndi, Class<T> clazz){
    try {
        Properties props = new Properties();
        props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
        props.put(Context.PROVIDER_URL, "t3://localhost:7001");

        InitialContext ctx = new InitialContext(props);

        T ejb = (T) ctx.lookup(jndi);
        PortableRemoteObject.narrow(ejb, clazz);
        return ejb;

    } catch (Exception e) {
        logger.error("Unable to lookup object of class {} through jndi name {}", clazz, jndi);
    }
    return null;
}

我找不到这个神秘的 vmcid: 0x0 minor code: 0 completed: Maybe 是什么意思,所以请至少提供线索是什么意思。请求在服务器端完成,因为那里没有错误。

最佳答案

快速搜索错误指向此 link .其中一项建议是不要使用 wlclient.jar,而是使用 weblogic.jar。从链接中引用,

Please try using weblogic.jar at client end or even there is a better option to create the "wlfullclient.jar" using the jarBuilder utility provided as part of WebLogic

问题似乎出在使用 WebLogic 的 t3 协议(protocol)时对象的编码中。请查看 this也有链接。

关于java - 'org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe' 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9002952/

相关文章:

java - 设置 weblogic 应用程序的系统属性

java - 如何在maven中执行多个ant目标

JAVA_HOME 含义

使用UnboundID LDAP SDK api的Java问题(调用带参数的方法)

java - Lotus Notes 5中如何查找最近修改过的文档

java - 使用有状态 EJB 部署项目期间的 Glassfish 异常

java - @EJB 组件处的 NullPointerException

java - 创建卡住线程 (Weblogic)(J2SE)(1.5)

java - java中如何拦截特定接口(interface)?

oracle - 针对 Oracle Forms 11g 应用程序使用 Glassfish 代替 WebLogic