RE: setPageSize causes blowup?

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Wed Jun 07 2006 - 16:25:56 EDT

  • Next message: Arturo Perez: "Re: setPageSize causes blowup?"

    Are you calling setPageSize() before or after the performQuery()?

    -----Original Message-----
    From: news [mailto:new..ea.gmane.org] On Behalf Of Arturo Perez
    Sent: Wednesday, June 07, 2006 4:10 PM
    To: cayenne-use..ncubator.apache.org
    Subject: setPageSize causes blowup?

    Using 1.2beta if I set the page size of a query to a number larger than
    the result set then an exception is being thrown.

    Now, this seems to be a bit of a catch 22 because I don't know
    how many items will be returned in general.

    Here's the stack trace.

    org.objectstyle.cayenne.CayenneRuntimeException:
    [v.1.2B2 April 17 2006]
    Error performing query.
            at
    org.objectstyle.cayenne.access.IncrementalFaultList.
    fillIn(IncrementalFaultList.java:265)
            at
    org.objectstyle.cayenne.access.IncrementalFaultList.<init>
    (IncrementalFaultList.java:192)
            at
    org.objectstyle.cayenne.access.DataContextQueryAction.
    interceptPaginatedQuery
    (DataContextQueryAction.java:128)
            at
    org.objectstyle.cayenne.access.DataContextQueryAction.execute
    (DataContextQueryAction.java:86)
            at org.objectstyle.cayenne.access.DataContext.
    onQuery(DataContext.java:1331)
            at org.objectstyle.cayenne.access.DataContext.
    performQuery(DataContext.java:1320)

    Caused by: java.sql.SQLException: Operation not allowed after ResultSet
    closed
            at com.mysql.jdbc.ResultSet.checkClosed(ResultSet.java:639)
            at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java:677)
            at com.mysql.jdbc.ResultSet.getNativeString(ResultSet.java:4000)
            at
    com.mysql.jdbc.ResultSet.getStringInternal(ResultSet.java:5153)
            at com.mysql.jdbc.ResultSet.getString(ResultSet.java:4999)
            at
    org.apache.commons.dbcp.DelegatingResultSet.getString
    (DelegatingResultSet.java:174)
            at
    org.objectstyle.cayenne.access.types.CharType.materializeObject
    (CharType.java:152)
            at
    org.objectstyle.cayenne.access.jdbc.JDBCResultIterator.readDataRow
    (JDBCResultIterator.java:305)
            at
    org.objectstyle.cayenne.access.jdbc.JDBCResultIterator.nextDataRow
    (JDBCResultIterator.java:163)
            at
    org.objectstyle.cayenne.access.IncrementalFaultList.fillIn
    (IncrementalFaultList.java:236)



    This archive was generated by hypermail 2.0.0 : Wed Jun 07 2006 - 16:26:23 EDT