You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org> on 2008/03/07 10:53:16 UTC

[jira] Closed: (CAY-1003) the paged queries in ROP can fail to fetch the subsequent pages if the client and server are in different timezones

     [ https://issues.apache.org/cayenne/browse/CAY-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1003.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

fixed. Indeed this was a problem when explicit caching was used

> the paged queries in ROP can fail to fetch the subsequent pages if the client and server are in different timezones
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1003
>                 URL: https://issues.apache.org/cayenne/browse/CAY-1003
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0
>         Environment: ROP, paging, LOCAL_CACHE with no setCacheGroups specified , cayenne v.3.0-SNAPSHOT Mar 05 2008 22:29:23, multiple timezones
>            Reporter: Marcin Skladaniec
>            Assignee: Andrus Adamchik
>             Fix For: 3.0
>
>
> if the client and server are in different timezone and the executed query has an qualifier like this:
> ExpressionFactory.greaterOrEqualExp(CourseClass.ENDDATETIME_PROPERTY, new Date())
> there is a possibility of a mismatch between the keys identifying the cache. 
> What happens I believe is that the initial SelectQuery creates the key on server, using the server timezone, while the query which faults the following page of data creates the key on client. My assumptions are based on the exception we see when we are trying to connect across timezones (we are in EST, server is in WST):
> org.apache.cayenne.CayenneRuntimeException: [v.3.0-SNAPSHOT Mar 05 2008 22:29:23] Remote error. URL - http://ahost:8181/angel-server-cayenne; CAUSE - [v.3.0-SNAPSHOT Mar 05 2008 22:29:23] No cached list for CourseClass/((endDateTime >= Fri Mar 07 12:45:17 EST 2008) or (endDateTime = null)) and (isCancelled != true)/course.name
>    at org.apache.cayenne.access.ClientServerChannelQueryAction.interceptSinglePageQuery(ClientServerChannelQueryAction.java:99)
>         at org.apache.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java:65)
>         at org.apache.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:82)
>         at org.apache.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:40)
>         at org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:153)
>         at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Closed: (CAY-1003) the paged queries in ROP can fail to fetch the subsequent pages if the client and server are in different timezones

Posted by Aristedes Maniatis <ar...@ish.com.au>.
On 07/03/2008, at 8:53 PM, Andrus Adamchik (JIRA) wrote:

>> if the client and server are in different timezone and the executed  
>> query has an qualifier like this:

Brilliant that you were able to find this. I think from our  
investigation this was the original problem behind CAY-998 too. Very  
subtle set of circumstances meant that we never saw it until now: ROP,  
paging on, caching on, querying on a date, client and server in  
different time zones.

We will give it a workout this coming week.

Thanks
Ari Maniatis



-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A