IBM Support

"org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge" when executing rules in RES with trace enabled

Troubleshooting


Problem

When executing rules in Rule Execution Server remotely, with the execution trace enabled on the client side, you might get an error similar to"org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge".

Symptom

The full stack trace could look like the following:

Exception in thread "P=214328:O=0:CT" java.rmi.MarshalException: CORBA MARSHAL 0x4942f896 No; nested exception is:
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : null  vmcid: IBM  minor code: 896  completed: No

    at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:273)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java:84)
    at ilog.rules.res.session.impl.ejb3._IlrStatelessSessionRemote_Stub.execute(_IlrStatelessSessionRemote_Stub.java)
    at test.RESClientEJB3.main(RESClientEJB3.java:64)
    Caused by: org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : null  vmcid: IBM  minor code: 896  completed: No
    at com.ibm.rmi.iiop.CDRReader.read_value(CDRReader.java:1574)
    at com.ibm.rmi.iiop.CDRReader.read_abstract_interface(CDRReader.java:1537)
    at com.ibm.rmi.iiop.CDRReader.read_abstract_interface(CDRReader.java:1529)
    ... 2 more
Caused by: org.omg.CORBA.MARSHAL  vmcid: IBM  minor code: 8B1  completed: No
    at com.ibm.rmi.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:484)
    at com.ibm.rmi.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:210)
    at com.ibm.rmi.iiop.CDRReader.read_value(CDRReader.java:1556)
    ... 4 more
Caused by: java.io.EOFException
    at com.ibm.rmi.io.IIOPInputStream.readByte(IIOPInputStream.java:765)
    at com.ibm.rmi.io.IIOPInputStream.inputObjectUsingClassDesc(IIOPInputStream.java:1420)
    at com.ibm.rmi.io.IIOPInputStream.inputObjectClassDesc(IIOPInputStream.java:1410)
    at com.ibm.rmi.io.IIOPInputStream.readSerializable(IIOPInputStream.java:1139)
    at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectInternal(IIOPInputStream.java:427)
    at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoop(IIOPInputStream.java:512)
    at com.ibm.rmi.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:382)
    at com.ibm.rmi.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:638)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:356)
    at java.util.ArrayList.readObject(ArrayList.java:717)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
               ...
    at java.lang.reflect.Method.invoke(Method.java:599)
    at com.ibm.rmi.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1700)
    at com.ibm.rmi.io.IIOPInputStream.inputObjectUsingClassDesc(IIOPInputStream.java:1435)
    at com.ibm.rmi.io.IIOPInputStream.inputObjectClassDesc(IIOPInputStream.java:1410)
    at com.ibm.rmi.io.IIOPInputStream.readSerializable(IIOPInputStream.java:1139)
    at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectInternal(IIOPInputStream.java:427)
    at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoop(IIOPInputStream.java:512)
    at com.ibm.rmi.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:464)
... 6 more
Caused by: org.omg.CORBA.MARSHAL: No available data: Request 11:read beyond end of data. No fragments available.  vmcid: OMG  minor code: 8 completed: Maybe
    at com.ibm.rmi.iiop.CDRReader.availableData(CDRReader.java:888)
    at com.ibm.rmi.iiop.CDRReader.alignAndCheck(CDRReader.java:864)
    at com.ibm.rmi.iiop.CDRInputStream.read_octet(CDRInputStream.java:291)
    at com.ibm.rmi.io.IIOPInputStream.readByte(IIOPInputStream.java:762)
    ... 110 more

Cause

In the case of remote calls, when the execution trace is enabled on the client side and includes the execution events with the objects bound in the rules, those objects are serialized back in the trace. If those XOM objects are not all serializable, the above error appears.

Even if all the bound objects are serializable, the error can also occur if you have at least one rule that does not bind any objects, because that rule binds the ilog.rules.engine.IlrContext instance in the IRL code, which also causes a serialization error.

In versions 7.0.X and 7.1.0, objects bound in the rules are included in the trace with the following methods:

    sessionRequest.setTraceEnabled(true);
    sessionRequest.getTraceFilter().setInfoAllFilters(true);
    or

    sessionRequest.setTraceEnabled(true);
    sessionRequest.getTraceFilter().setInfoExecutionEvents(true);

But from version 7.1.1 on, this last method does not include the objects bound in the rules with the execution events by default anymore. Therefore, unless you use the methodsetInfoAllFilters(true), you must include them explicitly with:

    sessionRequest.getTraceFilter().setInfoBoundObjectByRule(true);


    (where sessionRequest is the ilog.rules.res.session.IlrSessionRequest instance passed to the execute() method of the rule session; see IlrSessionRequest API doc).
Note: The issue does not show in 6.X versions, nor does it with the deprecated BRES API in 7.X, and in particular with the EJB2 rule session factory, because in those versions of the product, the objects are sent back with the list of executed rules to the client in string format through calls to the toString() method.

Resolving The Problem

If having all XOM objects implement the java.io.Serializable package is not an acceptable solution, you must filter out the information on the objects bound in the executed rules from the execution trace to avoid the error.

In 7.0.X and 7.1.0, you need to remove the execution events from the trace with:


    sessionRequest.getTraceFilter().setInfoExecutionEvents(false);

In 7.1.1 and later, you can keep the execution events and just remove the objects bound in the rules with:
    IlrSessionRequest.getTraceFilter().setInfoBoundObjectByRule(false);


Again, even if all your objects are serializable, if a rule does not bind any objects, it will bind the ilog.rules.engine.IlrContext instance in the IRL code. Therefore, you must remove the objects bound in the rules from the trace to avoid an error (as explained above), because its serialization fails, too.

[{"Product":{"code":"SS6MTS","label":"WebSphere ILOG JRules"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modules:Execution Server (BRES \/ RES)","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5;8.0;7.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21449110