openjpa-users mailing list archives

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

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(
      at org.apache.openjpa.lib.rop.WindowResultList.size(
      at org.apache.openjpa.kernel.DelegatingResultList.size(

Here are the persistence.xml properties:

      <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/>
      <property name="openjpa.ConnectionDriverName"     value=
      <property name="openjpa.ConnectionUserName"       value="abc"/>
      <property name="openjpa.ConnectionPassword"       value="123"/>
      <property name="openjpa.ConnectionRetainMode"     value="always"/>
      <property name="openjpa.jdbc.DBDictionary"        value=
      <property name="openjpa.FetchBatchSize"           value="0"/>
      <property name="openjpa.jdbc.ResultSetType"
      <property name="openjpa.jdbc.LRSSize"             value="last"/>
      <property name="openjpa.Log" value="SQL=TRACE"/>

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

View raw message