2 Replies Latest reply on Aug 25, 2004 7:31 PM by 3004

    java.rmi.MarshalException: error marshalling return;

    3004
      Hi All,

      I'm getting the above error whilst performing a query. My set up is,

      Kodo 3.1.5
      Weblogic 8.1

      I have created some classes using the reverse mapping from Sybase,
      enhanced them and uploaded them to my server. I have then attempted to
      retrieve the data via an EJB. However I get NotSerializableExceptions
      whilst doing so.

      I am attempting to return a Collection of enhanced objects, but even a
      single enhanced object throws that error


      I think it may be something to do with my package.jdo or something else.
      Can anyone help?

      My package.jdo looks like this,

      <?xml version="1.0" encoding="UTF-8"?>

      <jdo>
      <package name="com.lehman.clientseg.data">
      <class name="AuditRecord" objectid-class="AuditRecordId"/>
      <class name="Btb" objectid-class="BtbId"/>
      <class name="CashActivity" objectid-class="CashActivityId"/>
      <class name="CashBulk" objectid-class="CashBulkId"/>
      <class name="CcyTypeIndicator" objectid-class="CcyTypeIndicatorId">
      <field name="descn">
      <extension vendor-name="kodo" key="jdbc-size" value="-1"/>
      </field>
      </class>
      <class name="Counterparty" objectid-class="CounterpartyId"/>
      <class name="Currency" objectid-class="CurrencyId"/>
      <class name="DealType" objectid-class="DealTypeId"/>
      <class name="DeliveryInstruction"
      objectid-class="DeliveryInstructionId"/>
      <class name="Entity" objectid-class="EntityId"/>
      <class name="MonitoredEvent" objectid-class="MonitoredEventId"/>
      <class name="PaymentType" objectid-class="PaymentTypeId"/>
      <class name="Sequence" objectid-class="SequenceId"/>
      <class name="SettlementMode" objectid-class="SettlementModeId"/>
      </package>
      </jdo>

      and here is the stack trace,

      java.rmi.MarshalException: error marshalling return; nested exception is:
      java.io.NotSerializableException: com.lehman.clientseg.data.Entity
      at
      weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
      at
      weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
      at
      weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
      at
      com.lehman.clientseg.server.ejb.JDOBean_1a5ozo_EOImpl_812_WLStub.getAllEntities(Unknown
      Source)
      at com.lehman.clientseg.BeanTest.<init>(BeanTest.java:49)
      at com.lehman.clientseg.BeanTest.main(BeanTest.java:62)
      Caused by: java.io.NotSerializableException:
      com.lehman.clientseg.data.Entity
      at
      java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
      at
      java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
      at java.util.LinkedList.writeObject(LinkedList.java:681)
      at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at
      java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:795)
      at
      java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1294)
      at
      java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
      at
      java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
      at
      java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
      at
      weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:116)
      at
      weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:93)
      at
      com.lehman.clientseg.server.ejb.JDOBean_1a5ozo_EOImpl_WLSkel.invoke(Unknown
      Source)
      at
      weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
      at
      weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
      at
      weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
      at
      weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
      at
      weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
      at
      weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
      at
      weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)









        • 1. Re: java.rmi.MarshalException: error marshalling return;
          3004
          java.rmi.MarshalException: error marshalling return; nested exception is:
          java.io.NotSerializableException: com.lehman.clientseg.data.Entity
          Looks like you're trying to serialize a class that's not serializable,
          probably by returning it (or a class that has a relation to it) from an EJB.
          • 2. Re: java.rmi.MarshalException: error marshalling return;
            3004
            Abe White wrote:
            Looks like you're trying to serialize a class that's not serializable,
            probably by returning it (or a class that has a relation to it) from an EJB.
            Very strange. My classes where autogenerated using the reverse mapping
            tool and weren't serializable. I'm sure I once did make them serializable
            and I got more error messages. I just tried again and everything was fine.
            Hmmm... Must be going mad.

            Cheers,

            Stevie :)