I saw this posting on Google but could not find any responses. I'm
experiencing the same as what is described her. For some odd reason it seems
that WAS 5.1.X has a problem with Dom4J. No matter what I do I get the same
result; the client prints a stacktrace even though the server EJB has stated
that it succeeds with handling the call.
Any help would be appreciated.
Here's the original posting I found (thanks Trygve for supplying such an
easy example).

When acessing remote DOM4J Elements from an IBM client VM, we get the
client side exception below.

We're not experiencing this problem with any other objects than the
dom4j element, but think this is a coincidence. The dom4j *is*

serializable, and the client and server dom4j elements have identical
serialVersionUID's.

The following versions have been tested:
* Client: WSAD 5.1 and WSAD 5.1.1 trial, with both v5 and v5.1 JRE.
Also tried Express and EE versions.
* Server: WSAD 5.1 and WSAD 5.1.1 trial, with both v5 and v5.1 JRE.
Also tried Express and EE versions.
* Dom4J 1.3 and 1.4.

All exceptions occur on the client side. No traces whatsoever in the
server log. Intra server-calls (via EJB lookup) works.
We're running in production with WAS 5.0.0 and DOM4J 1.3 with no
problems.

/Trygve Amundsen


The stack trace:
java.rmi.MarshalException: CORBA MARSHAL 0x4942f89a No; nested
exception is:
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge :
Not enough custom marshaled data in enclosure vmcid:

IBM minor code: 89A completed: No
at
com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemExcep tion(UtilDelegateImpl.java
:198)
at javax.rmi.CORBA.Util.mapSystemException(Util.java: 83)
at
com.tma.test._TestElement_Stub.getEmptyElement(_Te stElement_Stub.java:318)
at com.tma.test.TestDom4J.testGetEmptyElement(TestDom 4J.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
..java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at junit.framework.TestCase.runTest(TestCase.java:154 )
at junit.framework.TestCase.runBare(TestCase.java:127 )
at junit.framework.TestResult$1.protect(TestResult.ja va:106)
at junit.framework.TestResult.runProtected(TestResult .java:124)
at junit.framework.TestResult.run(TestResult.java:109 )
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:2 08)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRu
nner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.
java:276)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner
..java:167)
Caused by: org.omg.CORBA.MARSHAL: Unable to read value from underlying
bridge : Not enough custom marshaled data in enclosure

vmcid: IBM minor code: 89A completed: No
at com.ibm.rmi.iiop.CDRInputStream.read_value(CDRInpu tStream.java:1745)
at
com.tma.test._TestElement_Stub.getEmptyElement(_Te stElement_Stub.java:307)
... 16 more



Sample SB code

public class TestElementBean implements javax.ejb.SessionBean {
// Fails on client side after call return. No trace in server log
public Element getElement() {
Element elem = DocumentHelper.createElement("TestElement");
System.out.println("Getting Element="+elem.asXML());
return elem;
}
// Fails on client side after call return. No trace in server log
public Element getEmptyElement() {
Element elem = DocumentHelper.createElement("TestElement");
return elem;
}
// Never gets called, fails on client side.
public void setElement(Element elem) {
System.out.println("Setting Element="+elem.asXML());
}

// Will return the same serialVersionUID as client side dom4j element
public long getElementsSerialVersionUID() {
Element elem = DocumentHelper.createElement("TestElement");
long serialVersionUID =
ObjectStreamClass.lookup(elem.getClass()).getSeria lVersionUID();
System.out.println("Getting Element
serialVersionUID="+serialVersionUID);
return serialVersionUID;
}
// Succeeds
public Element getNullElement() {
System.out.println("Getting null Element");
return null;
}
// standard SessionBean implementation below
...
}


Orb trace file :


09:55:18.244 com.ibm.rmi.io.IIOPInputStream invokeObjectReader:1525
P=516666:O=0:CT ORBRas[default]

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
..java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at
com.ibm.rmi.io.IIOPInputStream.invokeObjectReader( IIOPInputStream.java:1520)
at
com.ibm.rmi.io.IIOPInputStream.inputObjectUsingCla ssDesc(IIOPInputStream.jav
a:1294)
at
com.ibm.rmi.io.IIOPInputStream.inputObjectClassDes c(IIOPInputStream.java:126
9)
at
com.ibm.rmi.io.IIOPInputStream.readSerializable(II OPInputStream.java:1002)
at
com.ibm.rmi.io.IIOPInputStream.simpleReadObjectInt ernal(IIOPInputStream.java
:308)
at
com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoo p(IIOPInputStream.java:385
)
at
com.ibm.rmi.io.IIOPInputStream.simpleReadObject(II OPInputStream.java:339)
at com.ibm.rmi.io.ValueHandlerImpl.readValue(ValueHan dlerImpl.java:197)
at com.ibm.rmi.iiop.CDRInputStream.read_value(CDRInpu tStream.java:1738)
at com.tma.test._TestElement_Stub.getElement(_TestEle ment_Stub.java:344)
at com.tma.test.TestDom4J.testGetElement(TestDom4J.ja va:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
..java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at junit.framework.TestCase.runTest(TestCase.java:154 )
at junit.framework.TestCase.runBare(TestCase.java:127 )
at junit.framework.TestResult$1.protect(TestResult.ja va:106)
at junit.framework.TestResult.runProtected(TestResult .java:124)
at junit.framework.TestResult.run(TestResult.java:109 )
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:2 08)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRu
nner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.
java:276)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner
..java:167)
Caused by: org.omg.CORBA.MARSHAL: Not enough custom marshaled data in
enclosure vmcid: OMG minor code: 8 completed: Maybe
at com.ibm.rmi.iiop.CDRInputStream.alignAndCheck(CDRI nputStream.java:568)
at com.ibm.rmi.iiop.CDRInputStream.alignAndCheck(CDRI nputStream.java:507)
at com.ibm.rmi.iiop.CDRInputStream.read_long(CDRInput Stream.java:730)
at com.ibm.rmi.iiop.CDRInputStream.readValueTag(CDRIn putStream.java:2204)
at
com.ibm.rmi.iiop.CDRInputStream.fast_read_value(CD RInputStream.java:1532)
at com.ibm.rmi.io.IIOPInputStream.readValueType(IIOPI nputStream.java:2040)
at
com.ibm.rmi.io.IIOPInputStream.readObjectField(IIO PInputStream.java:2012)
at
com.ibm.rmi.io.IIOPInputStream.inputClassFields(II OPInputStream.java:1720)
at
com.ibm.rmi.io.IIOPInputStream.continueSimpleReadO bject(IIOPInputStream.java
:420)
at
com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoo p(IIOPInputStream.java:396
)
at
com.ibm.rmi.io.IIOPInputStream.defaultReadObject(I IOPInputStream.java:549)
at org.dom4j.QName.readObject(QName.java:187)
... 30 more

09:55:18.510 com.ibm.rmi.iiop.ClientResponseImpl read_value:1744
P=516666:O=0:CT ORBRas[default] org.omg.CORBA.MARSHAL: Not enough

custom marshaled data in enclosure vmcid: OMG minor code: 8
completed: Maybe
at com.ibm.rmi.iiop.CDRInputStream.alignAndCheck(CDRI nputStream.java:568)
at com.ibm.rmi.iiop.CDRInputStream.alignAndCheck(CDRI nputStream.java:507)
at com.ibm.rmi.iiop.CDRInputStream.read_long(CDRInput Stream.java:730)
at com.ibm.rmi.iiop.CDRInputStream.readValueTag(CDRIn putStream.java:2204)
at
com.ibm.rmi.iiop.CDRInputStream.fast_read_value(CD RInputStream.java:1532)
at com.ibm.rmi.io.IIOPInputStream.readValueType(IIOPI nputStream.java:2040)
at
com.ibm.rmi.io.IIOPInputStream.readObjectField(IIO PInputStream.java:2012)
at
com.ibm.rmi.io.IIOPInputStream.inputClassFields(II OPInputStream.java:1720)
at
com.ibm.rmi.io.IIOPInputStream.continueSimpleReadO bject(IIOPInputStream.java
:420)
at
com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoo p(IIOPInputStream.java:396
)
at
com.ibm.rmi.io.IIOPInputStream.defaultReadObject(I IOPInputStream.java:549)
at org.dom4j.QName.readObject(QName.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
..java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at
com.ibm.rmi.io.IIOPInputStream.invokeObjectReader( IIOPInputStream.java:1520)
at
com.ibm.rmi.io.IIOPInputStream.inputObjectUsingCla ssDesc(IIOPInputStream.jav
a:1294)
at
com.ibm.rmi.io.IIOPInputStream.inputObjectClassDes c(IIOPInputStream.java:126
9)
at
com.ibm.rmi.io.IIOPInputStream.readSerializable(II OPInputStream.java:1002)
at
com.ibm.rmi.io.IIOPInputStream.simpleReadObjectInt ernal(IIOPInputStream.java
:308)
at
com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoo p(IIOPInputStream.java:385
)
at
com.ibm.rmi.io.IIOPInputStream.simpleReadObject(II OPInputStream.java:339)
at com.ibm.rmi.io.ValueHandlerImpl.readValue(ValueHan dlerImpl.java:197)
at com.ibm.rmi.iiop.CDRInputStream.read_value(CDRInpu tStream.java:1738)
at com.tma.test._TestElement_Stub.getElement(_TestEle ment_Stub.java:344)
at com.tma.test.TestDom4J.testGetElement(TestDom4J.ja va:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
..java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at junit.framework.TestCase.runTest(TestCase.java:154 )
at junit.framework.TestCase.runBare(TestCase.java:127 )
at junit.framework.TestResult$1.protect(TestResult.ja va:106)
at junit.framework.TestResult.runProtected(TestResult .java:124)
at junit.framework.TestResult.run(TestResult.java:109 )
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:2 08)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRu
nner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.
java:276)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner
..java:167)


YS
Nils Pedersen