[JIRA] Created: (CAY-643) Paginates queries are failing

From: Marcin Skladaniec (JIRA) ("Marcin)
Date: Thu Aug 31 2006 - 02:18:49 EDT

  • Next message: Andrus Adamchik (JIRA): "[JIRA] Created: (CAY-644) Local cache doesn't work with paginated queries and DataContext"

    Paginates queries are failing
    -----------------------------

             Key: CAY-643
             URL: http://issues.apache.org/cayenne/browse/CAY-643
         Project: Cayenne
            Type: Bug

      Components: Cayenne Core Library
        Versions: 1.2 [STABLE]
        Reporter: Marcin Skladaniec

    The paging feature seems to be broken in the newest builds [v.1.2.1 August 30 2006]
    To reproduce:
    create and execute a select query:

    SelectQuery paginatedQuery = new SelectQuery(CRoom.class);
    paginatedQuery.setPageSize( pageSize );
    paginatedQuery.setCachePolicy(SelectQuery.LOCAL_CACHE);
    List rooms = context.performQuery(paginatedQuery);

    where pageSize is greater than number of records in the table

    now iterate through the list.
    for (int i=0; i< list.size();i++) {
    Everything is ok, until i< pageSize, when i>pageSize exception like this is thrown:

    [java] org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.1 August 30 2006] Remote error. URL - http://localhost:8080/test-server; CAUSE - [v.1.2.1 August 30 2006] [v.1.2.1 August 30 2006] Can't find id for {<ObjectId:Room, id=340>; committed; [willowId=>null; seatedCapacity=>null; modifiedOn=>null; site=>?; directions=>null; facilities=>null; isDeleted=>null; createdOn=>null; name=>room 0]}
         [java] at org.objectstyle.cayenne.remote.hessian.HessianConnection.doSendMessage(HessianConnection.java:181)
         [java] at org.objectstyle.cayenne.remote.BaseConnection.sendMessage(BaseConnection.java:109)
         [java] at org.objectstyle.cayenne.remote.ClientChannel.send(ClientChannel.java:278)
         [java] at org.objectstyle.cayenne.remote.ClientChannel.onQuery(ClientChannel.java:124)
         [java] at org.objectstyle.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:253)
         [java] at org.objectstyle.cayenne.CayenneContextQueryAction.execute(CayenneContextQueryAction.java:83)
         [java] at org.objectstyle.cayenne.CayenneContext.onQuery(CayenneContext.java:326)
         [java] at org.objectstyle.cayenne.CayenneContext.performQuery(CayenneContext.java:315)
         [java] at org.objectstyle.cayenne.remote.RemoteIncrementalFaultList.forceResolveInterval(RemoteIncrementalFaultList.java:279)
         [java] at org.objectstyle.cayenne.remote.RemoteIncrementalFaultList.resolveInterval(RemoteIncrementalFaultList.java:264)
         [java] at org.objectstyle.cayenne.remote.RemoteIncrementalFaultList.get(RemoteIncrementalFaultList.java:453)
         [java] at cayenne3t.example.client.Main.listRooms(Unknown Source)
         [java] at cayenne3t.example.client.Main.execute(Unknown Source)
         [java] at cayenne3t.example.client.Main.main(Unknown Source)
         [java] Caused by: org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.1 August 30 2006] [v.1.2.1 August 30 2006] Can't find id for {<ObjectId:Room, id=340>; committed; [willowId=>null; seatedCapacity=>null; modifiedOn=>null; site=>?; directions=>null; facilities=>null; isDeleted=>null; createdOn=>null; name=>room 0]}
         [java] at org.objectstyle.cayenne.access.IncrementalFaultList$IncrementalListHelper.updateWithResolvedObjectInRange(IncrementalFaultList.java:796)
         [java] at org.objectstyle.cayenne.access.IncrementalFaultList.resolveInterval(IncrementalFaultList.java:444)
         [java] at org.objectstyle.cayenne.access.IncrementalFaultList.subList(IncrementalFaultList.java:721)
         [java] at org.objectstyle.cayenne.access.ClientServerChannelQueryAction.interceptSinglePageQuery(ClientServerChannelQueryAction.java:131)
         [java] at org.objectstyle.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java:101)
         [java] at org.objectstyle.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:99)
         [java] at org.objectstyle.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:76)
         [java] at org.objectstyle.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:182)
         [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [java] at java.lang.reflect.Method.invoke(Method.java:585)
         [java] at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:157)
         [java] at org.objectstyle.cayenne.remote.hessian.service._HessianServlet.service(_HessianServlet.java:388)

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators:
       http://issues.apache.org/cayenne/secure/Administrators.jspa
    -
    For more information on JIRA, see:
       http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Thu Aug 31 2006 - 02:22:21 EDT