ArrayList Marshalling Problem

ArrayList Marshalling Problem

Post by omerahma » Mon, 18 Aug 2003 08:28:20


Hi All,

We are trying to invoke EJB methods on simple stateless session beans
from an Applet running remotely. One of our methods needs to return
an ArrayList of Serializable objects.

We have encoutered the following error: (please see end of post for
stack trace).

Some research has yielded the fact that even though the ArrayList
class in Java implements serializable, the Object[] member is not
serializable, even though the objects that we are putting into the
array are serializable.
Because our applet is REMOTE, we are using RMI-IIOP to access our
Beans which are on iPlanet 6.5.

The beans function properly for all base types and for simple
serilizable objects, but sadly, an ArrayList isn't one of them.

Has anyone else encountered this problem? Suggestions or alternatives
to using the ArrayList class would be appreciated as well.

Thanks in advance...

Omer/John.




--StackTrace--
java.io.IOException: Can't skip sender's custom marshaled class:
RMI:java.util.ArrayList:F655154F32815380:7881D21D99C7619D
at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Native
Method)
at com.sun.corba.se.internal.io.IIOPInputStream.simpleSkipObject(IIOPInputStream.java:330)
at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:235)
at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:207)
at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1059)
at j2eeguide.converter._Converter_Stub.trouble(_Converter_Stub.java:383)
at j2eeguide.converter.ConverterClient.main(Unknown Source)
Caught an unexpected exception!
java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
org.omg.CORBA.MARSHAL: Unable to read value from underlying
bridge : Can
't skip sender's custom marshaled class:
RMI:java.util.ArrayList:F655154F3281538
0:7881D21D99C7619D minor code: 0 completed: No
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge :
Can't skip
sender's custom marshaled class:
RMI:java.util.ArrayList:F655154F32815380:7881D2
1D99C7619D minor code: 0 completed: No
at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStre
am.java:1065)
at j2eeguide.converter._Converter_Stub.trouble(_Converter_Stub.java:383)
at j2eeguide.converter.ConverterClient.main(Unknown Source)