Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-643

Paginates queries are failing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2 branch
    • 3.0
    • Core Library
    • None

    Description

      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)

      Attachments

        Issue Links

          Activity

            People

              andrus Andrus Adamchik
              marcin Marcin Skladaniec
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: