You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by "Chell, Stephen" <st...@westpac.com.au> on 2020/04/09 06:23:07 UTC
Continuous Query problem
Hi all,
Has anyone come across the following error before when using continuous queries?
java.lang.Throwable: Exception occurred while applying query on a cache event.
at org.apache.geode.cache.query.cq.internal.CqEventImpl.setException(CqEventImpl.java:131) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.cache.query.cq.internal.CqEventImpl.<init>(CqEventImpl.java:53) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.cache.query.cq.internal.CqServiceImpl.dispatchCqListeners(CqServiceImpl.java:960) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processCqs(CacheClientUpdater.java:1319) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.handleUpdate(CacheClientUpdater.java:757) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processMessages(CacheClientUpdater.java:1660) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.run(CacheClientUpdater.java:487) [geode-core-1.9.2.jar!/:na]
I have two continuous queries in my app. The first one works, the second one doesn't.
The first one is:
SELECT * from /FM_TRADE_EVENTS WHERE tradeAuditAction <> 'MATURE'
It fetches JSON documents that have been serialized as PDX. The onEvent method in my CqListener implementation is successfully called with events that look like:
CqEvent [CqName=tradeEventListener; base operation=CREATE; cq operation=CREATE; key=TRADE-1006; value=PDX[19350515,__GEMFIRE_JSON]{...}]
(I've replaced the JSON document with ... for brevity.)
The second one selects from a different region:
SELECT * from /FM_TRADE_EVENTS_STATE WHERE subscriberID = 'MIR' AND status.name = 'Pending'
It fetches objects that were serialized from java POJOs of type GemfireEventState (a custom type). The onError method (not onEvent) in my CqListener implementation is called with events that look like:
CqEvent [CqName=tradeEventStateListener; base operation=CREATE; cq operation=null; key=TRADE-1006:MIR; value=com.westpac.rdp.event.gemfire.GemfireEventState@2b503086[eventKey=TRADE-1006,subscriberID=MIR,status=Pending,errorMessage=<null>]]
... and they contain a throwable as above.
It looks like the second query fails because the event has the "cq operation" field set to null. The question is why is it null? (In the first one both the base operation and cq operation are CREATE).
Another piece of info that may be relevant: the region queried by the second CqListener is populated by the first CqListener
Any help would be much appreciated!
Thanks in advance ...
Stephen
Confidential communication
Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
Westpac Institutional Bank is a division of Westpac Banking Corporation
Re: Continuous Query problem
Posted by "Chell, Stephen" <st...@westpac.com.au>.
HI Jason, to answer your questions:
> When populating the second region, is the client cq just doing a put back to the server or is it using some other mechanism to update the region?
Its using org.springframework.data.gemfire.GemfireTemplate.put(key,value). I do the same when populating the first region.
> Is there more than 1 client that is updating the region (not sure it would matter, just seeing if there is a chance at a possible version incompatibility).
No.
> It looks like the server is on 1.9.2?
The Pivotal gemfire server is 9.9.1. The geode client library is 1.9.2.
Thanks
Stephen
________________________________
From: Jason Huynh <jh...@pivotal.io>
Sent: Friday, 10 April 2020 6:02 AM
To: user@geode.apache.org <us...@geode.apache.org>
Subject: Re: Continuous Query problem
Hi Stephen,
I am not sure how the cq operation is null. I tried to reproduce with a test (not exactly the same and haven't been able to so far). The queries themselves look like they should work. When populating the second region, is the client cq just doing a put back to the server or is it using some other mechanism to update the region? Is there more than 1 client that is updating the region (not sure it would matter, just seeing if there is a chance at a possible version incompatibility). It looks like the server is on 1.9.2?
Anyone else with any ideas, please chime in :-)
-Jason
On Wed, Apr 8, 2020 at 11:26 PM Chell, Stephen <st...@westpac.com.au>> wrote:
Hi all,
Has anyone come across the following error before when using continuous queries?
java.lang.Throwable: Exception occurred while applying query on a cache event.
at org.apache.geode.cache.query.cq.internal.CqEventImpl.setException(CqEventImpl.java:131) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.cache.query.cq.internal.CqEventImpl.<init>(CqEventImpl.java:53) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.cache.query.cq.internal.CqServiceImpl.dispatchCqListeners(CqServiceImpl.java:960) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processCqs(CacheClientUpdater.java:1319) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.handleUpdate(CacheClientUpdater.java:757) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processMessages(CacheClientUpdater.java:1660) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.run(CacheClientUpdater.java:487) [geode-core-1.9.2.jar!/:na]
I have two continuous queries in my app. The first one works, the second one doesn't.
The first one is:
SELECT * from /FM_TRADE_EVENTS WHERE tradeAuditAction <> 'MATURE'
It fetches JSON documents that have been serialized as PDX. The onEvent method in my CqListener implementation is successfully called with events that look like:
CqEvent [CqName=tradeEventListener; base operation=CREATE; cq operation=CREATE; key=TRADE-1006; value=PDX[19350515,__GEMFIRE_JSON]{...}]
(I've replaced the JSON document with ... for brevity.)
The second one selects from a different region:
SELECT * from /FM_TRADE_EVENTS_STATE WHERE subscriberID = 'MIR' AND status.name<http://status.name> = 'Pending'
It fetches objects that were serialized from java POJOs of type GemfireEventState (a custom type). The onError method (not onEvent) in my CqListener implementation is called with events that look like:
CqEvent [CqName=tradeEventStateListener; base operation=CREATE; cq operation=null; key=TRADE-1006:MIR; value=com.westpac.rdp.event.gemfire.GemfireEventState@2b503086[eventKey=TRADE-1006,subscriberID=MIR,status=Pending,errorMessage=<null>]]
... and they contain a throwable as above.
It looks like the second query fails because the event has the "cq operation" field set to null. The question is why is it null? (In the first one both the base operation and cq operation are CREATE).
Another piece of info that may be relevant: the region queried by the second CqListener is populated by the first CqListener
Any help would be much appreciated!
Thanks in advance ...
Stephen
Confidential communication
Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
Westpac Institutional Bank is a division of Westpac Banking Corporation
Confidential communication
Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
Westpac Institutional Bank is a division of Westpac Banking Corporation
Re: Continuous Query problem
Posted by Anilkumar Gingade <ag...@pivotal.io>.
Here is the geode link for querying on enum type.
https://geode.apache.org/docs/guide/112/developing/query_select/the_where_clause.html
On Fri, Apr 10, 2020 at 11:55 AM Anilkumar Gingade <ag...@pivotal.io>
wrote:
> Hi Stephen,
>
> For enum type, you have to use toString() in the query where clause.
> select * from /exampleRegion p where p.eStatus.toString() = 'active'
>
> You can find more on this at:
>
> https://gemfire.docs.pivotal.io/910/geode/developing/query_select/the_where_clause.html
>
> -Anil
>
>
>
>
> On Thu, Apr 9, 2020 at 5:12 PM Chell, Stephen <
> stephen.chell@westpac.com.au> wrote:
>
>> Hi Anil,
>>
>> Yes, status is an enum type.
>> tradeAuditAction is a field in the JSON document.
>>
>> Regards
>> Stephen
>>
>> ________________________________
>> From: Anilkumar Gingade <ag...@pivotal.io>
>> Sent: Friday, 10 April 2020 8:53 AM
>> To: user@geode.apache.org <us...@geode.apache.org>
>> Subject: Re: Continuous Query problem
>>
>> What is the type of "status" and "tradeAuditAction" fields?
>> Is status enum type?
>>
>> -Anil
>>
>>
>>
>> On Thu, Apr 9, 2020 at 1:03 PM Jason Huynh <jhuynh@pivotal.io<mailto:
>> jhuynh@pivotal.io>> wrote:
>> Hi Stephen,
>>
>> I am not sure how the cq operation is null. I tried to reproduce with a
>> test (not exactly the same and haven't been able to so far). The queries
>> themselves look like they should work. When populating the second region,
>> is the client cq just doing a put back to the server or is it using some
>> other mechanism to update the region? Is there more than 1 client that is
>> updating the region (not sure it would matter, just seeing if there is a
>> chance at a possible version incompatibility). It looks like the server is
>> on 1.9.2?
>>
>> Anyone else with any ideas, please chime in :-)
>>
>> -Jason
>>
>>
>>
>>
>>
>> On Wed, Apr 8, 2020 at 11:26 PM Chell, Stephen <
>> stephen.chell@westpac.com.au<ma...@westpac.com.au>> wrote:
>> Hi all,
>>
>> Has anyone come across the following error before when using continuous
>> queries?
>>
>> java.lang.Throwable: Exception occurred while applying query on a cache
>> event.
>> at
>> org.apache.geode.cache.query.cq.internal.CqEventImpl.setException(CqEventImpl.java:131)
>> ~[geode-cq-1.9.2.jar!/:na]
>> at
>> org.apache.geode.cache.query.cq.internal.CqEventImpl.<init>(CqEventImpl.java:53)
>> ~[geode-cq-1.9.2.jar!/:na]
>> at
>> org.apache.geode.cache.query.cq.internal.CqServiceImpl.dispatchCqListeners(CqServiceImpl.java:960)
>> ~[geode-cq-1.9.2.jar!/:na]
>> at
>> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processCqs(CacheClientUpdater.java:1319)
>> [geode-core-1.9.2.jar!/:na]
>> at
>> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.handleUpdate(CacheClientUpdater.java:757)
>> [geode-core-1.9.2.jar!/:na]
>> at
>> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processMessages(CacheClientUpdater.java:1660)
>> [geode-core-1.9.2.jar!/:na]
>> at
>> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.run(CacheClientUpdater.java:487)
>> [geode-core-1.9.2.jar!/:na]
>>
>> I have two continuous queries in my app. The first one works, the second
>> one doesn't.
>>
>> The first one is:
>> SELECT * from /FM_TRADE_EVENTS WHERE tradeAuditAction <> 'MATURE'
>> It fetches JSON documents that have been serialized as PDX. The onEvent
>> method in my CqListener implementation is successfully called with events
>> that look like:
>> CqEvent [CqName=tradeEventListener; base operation=CREATE; cq
>> operation=CREATE; key=TRADE-1006; value=PDX[19350515,__GEMFIRE_JSON]{...}]
>> (I've replaced the JSON document with ... for brevity.)
>>
>> The second one selects from a different region:
>> SELECT * from /FM_TRADE_EVENTS_STATE WHERE subscriberID = 'MIR' AND
>> status.name<http://status.name> = 'Pending'
>> It fetches objects that were serialized from java POJOs of type
>> GemfireEventState (a custom type). The onError method (not onEvent) in my
>> CqListener implementation is called with events that look like:
>> CqEvent [CqName=tradeEventStateListener; base operation=CREATE; cq
>> operation=null; key=TRADE-1006:MIR;
>> value=com.westpac.rdp.event.gemfire.GemfireEventState@2b503086
>> [eventKey=TRADE-1006,subscriberID=MIR,status=Pending,errorMessage=<null>]]
>> ... and they contain a throwable as above.
>>
>> It looks like the second query fails because the event has the "cq
>> operation" field set to null. The question is why is it null? (In the
>> first one both the base operation and cq operation are CREATE).
>>
>> Another piece of info that may be relevant: the region queried by the
>> second CqListener is populated by the first CqListener
>>
>> Any help would be much appreciated!
>>
>> Thanks in advance ...
>>
>> Stephen
>>
>> Confidential communication
>> Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
>> Westpac Institutional Bank is a division of Westpac Banking Corporation
>>
>> Confidential communication
>> Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
>> Westpac Institutional Bank is a division of Westpac Banking Corporation
>>
>
Re: Continuous Query problem
Posted by Anilkumar Gingade <ag...@pivotal.io>.
Hi Stephen,
For enum type, you have to use toString() in the query where clause.
select * from /exampleRegion p where p.eStatus.toString() = 'active'
You can find more on this at:
https://gemfire.docs.pivotal.io/910/geode/developing/query_select/the_where_clause.html
-Anil
On Thu, Apr 9, 2020 at 5:12 PM Chell, Stephen <st...@westpac.com.au>
wrote:
> Hi Anil,
>
> Yes, status is an enum type.
> tradeAuditAction is a field in the JSON document.
>
> Regards
> Stephen
>
> ________________________________
> From: Anilkumar Gingade <ag...@pivotal.io>
> Sent: Friday, 10 April 2020 8:53 AM
> To: user@geode.apache.org <us...@geode.apache.org>
> Subject: Re: Continuous Query problem
>
> What is the type of "status" and "tradeAuditAction" fields?
> Is status enum type?
>
> -Anil
>
>
>
> On Thu, Apr 9, 2020 at 1:03 PM Jason Huynh <jhuynh@pivotal.io<mailto:
> jhuynh@pivotal.io>> wrote:
> Hi Stephen,
>
> I am not sure how the cq operation is null. I tried to reproduce with a
> test (not exactly the same and haven't been able to so far). The queries
> themselves look like they should work. When populating the second region,
> is the client cq just doing a put back to the server or is it using some
> other mechanism to update the region? Is there more than 1 client that is
> updating the region (not sure it would matter, just seeing if there is a
> chance at a possible version incompatibility). It looks like the server is
> on 1.9.2?
>
> Anyone else with any ideas, please chime in :-)
>
> -Jason
>
>
>
>
>
> On Wed, Apr 8, 2020 at 11:26 PM Chell, Stephen <
> stephen.chell@westpac.com.au<ma...@westpac.com.au>> wrote:
> Hi all,
>
> Has anyone come across the following error before when using continuous
> queries?
>
> java.lang.Throwable: Exception occurred while applying query on a cache
> event.
> at
> org.apache.geode.cache.query.cq.internal.CqEventImpl.setException(CqEventImpl.java:131)
> ~[geode-cq-1.9.2.jar!/:na]
> at
> org.apache.geode.cache.query.cq.internal.CqEventImpl.<init>(CqEventImpl.java:53)
> ~[geode-cq-1.9.2.jar!/:na]
> at
> org.apache.geode.cache.query.cq.internal.CqServiceImpl.dispatchCqListeners(CqServiceImpl.java:960)
> ~[geode-cq-1.9.2.jar!/:na]
> at
> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processCqs(CacheClientUpdater.java:1319)
> [geode-core-1.9.2.jar!/:na]
> at
> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.handleUpdate(CacheClientUpdater.java:757)
> [geode-core-1.9.2.jar!/:na]
> at
> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processMessages(CacheClientUpdater.java:1660)
> [geode-core-1.9.2.jar!/:na]
> at
> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.run(CacheClientUpdater.java:487)
> [geode-core-1.9.2.jar!/:na]
>
> I have two continuous queries in my app. The first one works, the second
> one doesn't.
>
> The first one is:
> SELECT * from /FM_TRADE_EVENTS WHERE tradeAuditAction <> 'MATURE'
> It fetches JSON documents that have been serialized as PDX. The onEvent
> method in my CqListener implementation is successfully called with events
> that look like:
> CqEvent [CqName=tradeEventListener; base operation=CREATE; cq
> operation=CREATE; key=TRADE-1006; value=PDX[19350515,__GEMFIRE_JSON]{...}]
> (I've replaced the JSON document with ... for brevity.)
>
> The second one selects from a different region:
> SELECT * from /FM_TRADE_EVENTS_STATE WHERE subscriberID = 'MIR' AND
> status.name<http://status.name> = 'Pending'
> It fetches objects that were serialized from java POJOs of type
> GemfireEventState (a custom type). The onError method (not onEvent) in my
> CqListener implementation is called with events that look like:
> CqEvent [CqName=tradeEventStateListener; base operation=CREATE; cq
> operation=null; key=TRADE-1006:MIR;
> value=com.westpac.rdp.event.gemfire.GemfireEventState@2b503086
> [eventKey=TRADE-1006,subscriberID=MIR,status=Pending,errorMessage=<null>]]
> ... and they contain a throwable as above.
>
> It looks like the second query fails because the event has the "cq
> operation" field set to null. The question is why is it null? (In the
> first one both the base operation and cq operation are CREATE).
>
> Another piece of info that may be relevant: the region queried by the
> second CqListener is populated by the first CqListener
>
> Any help would be much appreciated!
>
> Thanks in advance ...
>
> Stephen
>
> Confidential communication
> Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
> Westpac Institutional Bank is a division of Westpac Banking Corporation
>
> Confidential communication
> Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
> Westpac Institutional Bank is a division of Westpac Banking Corporation
>
Re: Continuous Query problem
Posted by "Chell, Stephen" <st...@westpac.com.au>.
Hi Anil,
Yes, status is an enum type.
tradeAuditAction is a field in the JSON document.
Regards
Stephen
________________________________
From: Anilkumar Gingade <ag...@pivotal.io>
Sent: Friday, 10 April 2020 8:53 AM
To: user@geode.apache.org <us...@geode.apache.org>
Subject: Re: Continuous Query problem
What is the type of "status" and "tradeAuditAction" fields?
Is status enum type?
-Anil
On Thu, Apr 9, 2020 at 1:03 PM Jason Huynh <jh...@pivotal.io>> wrote:
Hi Stephen,
I am not sure how the cq operation is null. I tried to reproduce with a test (not exactly the same and haven't been able to so far). The queries themselves look like they should work. When populating the second region, is the client cq just doing a put back to the server or is it using some other mechanism to update the region? Is there more than 1 client that is updating the region (not sure it would matter, just seeing if there is a chance at a possible version incompatibility). It looks like the server is on 1.9.2?
Anyone else with any ideas, please chime in :-)
-Jason
On Wed, Apr 8, 2020 at 11:26 PM Chell, Stephen <st...@westpac.com.au>> wrote:
Hi all,
Has anyone come across the following error before when using continuous queries?
java.lang.Throwable: Exception occurred while applying query on a cache event.
at org.apache.geode.cache.query.cq.internal.CqEventImpl.setException(CqEventImpl.java:131) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.cache.query.cq.internal.CqEventImpl.<init>(CqEventImpl.java:53) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.cache.query.cq.internal.CqServiceImpl.dispatchCqListeners(CqServiceImpl.java:960) ~[geode-cq-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processCqs(CacheClientUpdater.java:1319) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.handleUpdate(CacheClientUpdater.java:757) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processMessages(CacheClientUpdater.java:1660) [geode-core-1.9.2.jar!/:na]
at org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.run(CacheClientUpdater.java:487) [geode-core-1.9.2.jar!/:na]
I have two continuous queries in my app. The first one works, the second one doesn't.
The first one is:
SELECT * from /FM_TRADE_EVENTS WHERE tradeAuditAction <> 'MATURE'
It fetches JSON documents that have been serialized as PDX. The onEvent method in my CqListener implementation is successfully called with events that look like:
CqEvent [CqName=tradeEventListener; base operation=CREATE; cq operation=CREATE; key=TRADE-1006; value=PDX[19350515,__GEMFIRE_JSON]{...}]
(I've replaced the JSON document with ... for brevity.)
The second one selects from a different region:
SELECT * from /FM_TRADE_EVENTS_STATE WHERE subscriberID = 'MIR' AND status.name<http://status.name> = 'Pending'
It fetches objects that were serialized from java POJOs of type GemfireEventState (a custom type). The onError method (not onEvent) in my CqListener implementation is called with events that look like:
CqEvent [CqName=tradeEventStateListener; base operation=CREATE; cq operation=null; key=TRADE-1006:MIR; value=com.westpac.rdp.event.gemfire.GemfireEventState@2b503086[eventKey=TRADE-1006,subscriberID=MIR,status=Pending,errorMessage=<null>]]
... and they contain a throwable as above.
It looks like the second query fails because the event has the "cq operation" field set to null. The question is why is it null? (In the first one both the base operation and cq operation are CREATE).
Another piece of info that may be relevant: the region queried by the second CqListener is populated by the first CqListener
Any help would be much appreciated!
Thanks in advance ...
Stephen
Confidential communication
Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
Westpac Institutional Bank is a division of Westpac Banking Corporation
Confidential communication
Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
Westpac Institutional Bank is a division of Westpac Banking Corporation
Re: Continuous Query problem
Posted by Anilkumar Gingade <ag...@pivotal.io>.
What is the type of "status" and "tradeAuditAction" fields?
Is status enum type?
-Anil
On Thu, Apr 9, 2020 at 1:03 PM Jason Huynh <jh...@pivotal.io> wrote:
> Hi Stephen,
>
> I am not sure how the cq operation is null. I tried to reproduce with a
> test (not exactly the same and haven't been able to so far). The queries
> themselves look like they should work. When populating the second region,
> is the client cq just doing a put back to the server or is it using some
> other mechanism to update the region? Is there more than 1 client that is
> updating the region (not sure it would matter, just seeing if there is a
> chance at a possible version incompatibility). It looks like the server is
> on 1.9.2?
>
> Anyone else with any ideas, please chime in :-)
>
> -Jason
>
>
>
>
>
> On Wed, Apr 8, 2020 at 11:26 PM Chell, Stephen <
> stephen.chell@westpac.com.au> wrote:
>
>> Hi all,
>>
>> Has anyone come across the following error before when using continuous
>> queries?
>>
>> java.lang.Throwable: Exception occurred while applying query on a cache
>> event.
>> at
>> org.apache.geode.cache.query.cq.internal.CqEventImpl.setException(CqEventImpl.java:131)
>> ~[geode-cq-1.9.2.jar!/:na]
>> at
>> org.apache.geode.cache.query.cq.internal.CqEventImpl.<init>(CqEventImpl.java:53)
>> ~[geode-cq-1.9.2.jar!/:na]
>> at
>> org.apache.geode.cache.query.cq.internal.CqServiceImpl.dispatchCqListeners(CqServiceImpl.java:960)
>> ~[geode-cq-1.9.2.jar!/:na]
>> at
>> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processCqs(CacheClientUpdater.java:1319)
>> [geode-core-1.9.2.jar!/:na]
>> at
>> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.handleUpdate(CacheClientUpdater.java:757)
>> [geode-core-1.9.2.jar!/:na]
>> at
>> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processMessages(CacheClientUpdater.java:1660)
>> [geode-core-1.9.2.jar!/:na]
>> at
>> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.run(CacheClientUpdater.java:487)
>> [geode-core-1.9.2.jar!/:na]
>>
>> I have two continuous queries in my app. The first one works, the second
>> one doesn't.
>>
>> The first one is:
>> SELECT * from /FM_TRADE_EVENTS WHERE tradeAuditAction <> 'MATURE'
>> It fetches JSON documents that have been serialized as PDX. The onEvent
>> method in my CqListener implementation is successfully called with events
>> that look like:
>> CqEvent [CqName=tradeEventListener; base operation=CREATE; cq
>> operation=CREATE; key=TRADE-1006; value=PDX[19350515,__GEMFIRE_JSON]{...}]
>> (I've replaced the JSON document with ... for brevity.)
>>
>> The second one selects from a different region:
>> SELECT * from /FM_TRADE_EVENTS_STATE WHERE subscriberID = 'MIR' AND
>> status.name = 'Pending'
>> It fetches objects that were serialized from java POJOs of type
>> GemfireEventState (a custom type). The onError method (not onEvent) in my
>> CqListener implementation is called with events that look like:
>> CqEvent [CqName=tradeEventStateListener; base operation=CREATE; cq
>> operation=null; key=TRADE-1006:MIR;
>> value=com.westpac.rdp.event.gemfire.GemfireEventState@2b503086
>> [eventKey=TRADE-1006,subscriberID=MIR,status=Pending,errorMessage=<null>]]
>> ... and they contain a throwable as above.
>>
>> It looks like the second query fails because the event has the "cq
>> operation" field set to null. The question is why is it null? (In the
>> first one both the base operation and cq operation are CREATE).
>>
>> Another piece of info that may be relevant: the region queried by the
>> second CqListener is populated by the first CqListener
>>
>> Any help would be much appreciated!
>>
>> Thanks in advance ...
>>
>> Stephen
>>
>> Confidential communication
>> Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
>> Westpac Institutional Bank is a division of Westpac Banking Corporation
>>
>
Re: Continuous Query problem
Posted by Jason Huynh <jh...@pivotal.io>.
Hi Stephen,
I am not sure how the cq operation is null. I tried to reproduce with a
test (not exactly the same and haven't been able to so far). The queries
themselves look like they should work. When populating the second region,
is the client cq just doing a put back to the server or is it using some
other mechanism to update the region? Is there more than 1 client that is
updating the region (not sure it would matter, just seeing if there is a
chance at a possible version incompatibility). It looks like the server is
on 1.9.2?
Anyone else with any ideas, please chime in :-)
-Jason
On Wed, Apr 8, 2020 at 11:26 PM Chell, Stephen <st...@westpac.com.au>
wrote:
> Hi all,
>
> Has anyone come across the following error before when using continuous
> queries?
>
> java.lang.Throwable: Exception occurred while applying query on a cache
> event.
> at
> org.apache.geode.cache.query.cq.internal.CqEventImpl.setException(CqEventImpl.java:131)
> ~[geode-cq-1.9.2.jar!/:na]
> at
> org.apache.geode.cache.query.cq.internal.CqEventImpl.<init>(CqEventImpl.java:53)
> ~[geode-cq-1.9.2.jar!/:na]
> at
> org.apache.geode.cache.query.cq.internal.CqServiceImpl.dispatchCqListeners(CqServiceImpl.java:960)
> ~[geode-cq-1.9.2.jar!/:na]
> at
> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processCqs(CacheClientUpdater.java:1319)
> [geode-core-1.9.2.jar!/:na]
> at
> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.handleUpdate(CacheClientUpdater.java:757)
> [geode-core-1.9.2.jar!/:na]
> at
> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.processMessages(CacheClientUpdater.java:1660)
> [geode-core-1.9.2.jar!/:na]
> at
> org.apache.geode.internal.cache.tier.sockets.CacheClientUpdater.run(CacheClientUpdater.java:487)
> [geode-core-1.9.2.jar!/:na]
>
> I have two continuous queries in my app. The first one works, the second
> one doesn't.
>
> The first one is:
> SELECT * from /FM_TRADE_EVENTS WHERE tradeAuditAction <> 'MATURE'
> It fetches JSON documents that have been serialized as PDX. The onEvent
> method in my CqListener implementation is successfully called with events
> that look like:
> CqEvent [CqName=tradeEventListener; base operation=CREATE; cq
> operation=CREATE; key=TRADE-1006; value=PDX[19350515,__GEMFIRE_JSON]{...}]
> (I've replaced the JSON document with ... for brevity.)
>
> The second one selects from a different region:
> SELECT * from /FM_TRADE_EVENTS_STATE WHERE subscriberID = 'MIR' AND
> status.name = 'Pending'
> It fetches objects that were serialized from java POJOs of type
> GemfireEventState (a custom type). The onError method (not onEvent) in my
> CqListener implementation is called with events that look like:
> CqEvent [CqName=tradeEventStateListener; base operation=CREATE; cq
> operation=null; key=TRADE-1006:MIR;
> value=com.westpac.rdp.event.gemfire.GemfireEventState@2b503086
> [eventKey=TRADE-1006,subscriberID=MIR,status=Pending,errorMessage=<null>]]
> ... and they contain a throwable as above.
>
> It looks like the second query fails because the event has the "cq
> operation" field set to null. The question is why is it null? (In the
> first one both the base operation and cq operation are CREATE).
>
> Another piece of info that may be relevant: the region queried by the
> second CqListener is populated by the first CqListener
>
> Any help would be much appreciated!
>
> Thanks in advance ...
>
> Stephen
>
> Confidential communication
> Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
> Westpac Institutional Bank is a division of Westpac Banking Corporation
>