openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: Using FetchPlan.setFetchBatchSize() feature leads to java.io.NotSerializableException
Date Thu, 08 Sep 2011 14:19:58 GMT
Does this problem only occur when you set the fetch batch size? I tried
recreating this problem on trunk with a simple unit test where I serialized
a result that came from a cached query and I am unable to see the same
behavior. If I get some time this am I'll give it a shot on 1.2.x.

Thanks,
Rick

On Thu, Sep 8, 2011 at 8:33 AM, M. Walter <marc.walter@sbb.ch> wrote:

> In my code I would like to set the fetch batch size in order to "speed up"
> loading entities:
>
> final OpenJPAQuery ojpaQuery =
> OpenJPAPersistence.cast(em.createNamedQuery(myNiceQuery));
> ojpaQuery.getFetchPlan().setFetchBatchSize(2000);
> final List result = ojpaQuery.getResultList();
>
> The result list should be sent to a RCP client.
> Now I wonder why I get java.io.NotSerializableException on the client side
> using this feature:
>
> Exception in thread "P=573122:O=0:CT" java.rmi.MarshalException: CORBA
> BAD_PARAM 0x4f4d0006 Maybe; nested exception is:
>        java.io.NotSerializableException:
>        >> SERVER (id=4773e3aa, host=myhost.mycompany.com) TRACE START:
>        >>    org.omg.CORBA.BAD_PARAM:
>
> org.apache.openjpa.datacache.QueryCacheStoreQuery$CachingResultObjectProvider
> is not serializable  vmcid: OMG  minor code: 6 completed: Maybe
>        >>       at
> com.ibm.rmi.util.Utility.throwNotSerializableForCorba(Utility.java:1661)
>        >>       at
> com.ibm.rmi.io.IIOPOutputStream.writeValueType(IIOPOutputStream.java:1142)
>        >>       at
>
> com.ibm.rmi.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:1082)
>        >>       at
>
> com.ibm.rmi.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:1013)
>        >>       at
> com.ibm.rmi.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:997)
>        >>       at
>
> com.ibm.rmi.io.IIOPOutputStream.continueSimpleWriteObject(IIOPOutputStream.java:484)
>        >>       at
>
> com.ibm.rmi.io.IIOPOutputStream.simpleWriteObjectLoop(IIOPOutputStream.java:464)
>        >>       at
>
> com.ibm.rmi.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:528)
>        >>       at
> com.ibm.rmi.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:168)
>        >>       at
> com.ibm.rmi.iiop.CDRWriter.write_value(CDRWriter.java:1195)
>        >>       at
> com.ibm.rmi.iiop.CDRWriter.write_value(CDRWriter.java:1213)
>        >>       at
> com.ibm.rmi.iiop.CDRWriter.write_abstract_interface(CDRWriter.java:1118)
>        >>       at
>
> com.ibm.CORBA.iiop.UtilDelegateImpl.writeAbstractObject(UtilDelegateImpl.java:483)
>        >>       at javax.rmi.CORBA.Util.writeAbstractObject(Util.java:148)
>        >>       at ...
>        >>       at
>
> com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:623)
>        >>       at
> com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:476)
>        >>       at com.ibm.rmi.iiop.ORB.process(ORB.java:513)
>        >>       at com.ibm.CORBA.iiop.ORB.process(ORB.java:1574)
>        >>       at
> com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2845)
>        >>       at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2718)
>        >>       at
> com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
>        >>       at
> com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
>        >>       at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
>        >> SERVER (id=4773e3aa, host=myhost.mycompany.com) TRACE END.
>
> Please can someone explain what I'm doing wrong? Thank you.
> I'm using OpenJPA 1.2.3.
>



-- 
*Rick Curtis*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message