FAQ
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



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.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedMar 7, '08 at 2:21a
activeMar 7, '08 at 2:21a
posts1
users1
websitecayenne.apache.org

1 user in discussion

Anonymous: 1 post

People

Translate

site design / logo © 2022 Grokbase