openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Giblin <...@zurich.ibm.com>
Subject noob: NoSuchElementException when using FetchBatchSize
Date Thu, 29 Oct 2009 22:23:11 GMT

Hi,
I have OpenJPA 1.2.1, Derby 10.3 and deal with large result sets.  When I
configure openjpa.FetchBatchSize to any number, 0, 1000, whatever, I get
the following exception:

java.util.NoSuchElementException: The result list has been closed.
      at org.apache.openjpa.lib.rop.AbstractResultList.assertOpen(
AbstractResultList.java:89)
      at org.apache.openjpa.lib.rop.WindowResultList.size(
WindowResultList.java:84)
      at org.apache.openjpa.kernel.DelegatingResultList.size(
DelegatingResultList.java:136)
      at com.ibm.xxxx.SomeClass.test(SomeClass.java:30)

Here are the persistence.xml properties:

<properties>
      <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/>
      <property name="openjpa.ConnectionDriverName"     value=
"org.apache.derby.jdbc.ClientDriver"/>
      <property name="openjpa.ConnectionUserName"       value="abc"/>
      <property name="openjpa.ConnectionPassword"       value="123"/>
      <property name="openjpa.ConnectionRetainMode"     value="always"/>
      <property name="openjpa.jdbc.DBDictionary"        value=
"batchLimit=200"/>
      <property name="openjpa.FetchBatchSize"           value="0"/>
      <property name="openjpa.jdbc.ResultSetType"
value="scroll-sensitive"/>
      <property name="openjpa.jdbc.LRSSize"             value="last"/>
      <property name="openjpa.Log" value="SQL=TRACE"/>
</properties>


I have tried various combinations of the properties, but always get the
exception once FetchBatchSize is used.

How can I avoid this exception?

Thanks, chris


Mime
View raw message