Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-31 Thread Alex Plehanov
Once the table is recreated (or index rebuilded) the issue is fixed.
Upgrading from 2.12 to 2.13 (if all indexes having this issue are already
rebuilded on 2.12) should be fine.

ср, 31 авг. 2022 г. в 23:43, John Smith :

> Ok but since I dropped and recreated the table I'm fine? It won't somehow
> throw that error again? And if I upgrade to 2.13 from 2.12 will I have the
> same issue?
>
> On Wed, Aug 31, 2022 at 3:31 PM Alex Plehanov 
> wrote:
>
>> John Smith,
>>
>> Thank you. This issue will be fixed in upcoming 2.14.
>>
>> ср, 31 авг. 2022 г. в 21:50, John Smith :
>>
>>> Here it is... And yes I recently upgraded to 2.12 from 2.8.1
>>>
>>> create table if not exists car_code (
>>> provider_id int,
>>> car_id int,
>>> car_code varchar(16),
>>> primary key (provider_id, car_id)
>>> ) with "template=replicatedTpl, key_type=CarCodeKey, value_type=CarCode";
>>>
>>> On Wed, Aug 31, 2022 at 7:25 AM Alex Plehanov 
>>> wrote:
>>>
 John Smith,

 Can you please show DDL for the car_code table? Does PK of this table
 include provider_id or car_code columns?
 I found a compatibility issue, with the same behaviour, it happens when
 storage created with Ignite version before 2.11 is used with the newer
 Ignite version. Have you upgraded the dev environment with existing storage
 recently (before starting to get this error)?


 чт, 4 авг. 2022 г. в 17:06, John Smith :

> Let me know if that makes any sense, because the test data is the same
> and the application code is the same. Only dropped and created the table
> again using DbEaver.
>
> On Wed, Aug 3, 2022 at 11:39 AM John Smith 
> wrote:
>
>> Hi, so I dropped the table and simply recreated it. Did NOT restart
>> the application.
>>
>> Now it works fine.
>>
>> On Wed, Aug 3, 2022 at 9:58 AM John Smith 
>> wrote:
>>
>>> How? The code is 100% the same between production and dev. And it's
>>> part of a bigger application.
>>>
>>> Only dev has the issue. I will drop and recreate the table if that
>>> fixes the issue then what?
>>>
>>> You are saying mismatch, it's a string period.
>>>
>>> "select car_id from car_code where provider_id = ? and car_code = ? 
>>> order by car_id asc limit 1;"
>>>
>>>
>>> The first parameter is Integer and the second one is String. there's
>>> no way this can mismatch... And even if the String was a UUID it's 
>>> still a
>>> string.
>>>
>>> public JsonArray query(final String sql, final long timeoutMs,
>>> final Object... args) {
>>> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
>>> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>>>
>>> try (QueryCursor> cursor = cache.query(query)) {
>>> List rows = new ArrayList<>();
>>> Iterator> iterator = cursor.iterator();
>>>
>>> while(iterator.hasNext()) {
>>> List currentRow = iterator.next();
>>> JsonArray row = new JsonArray();
>>>
>>> currentRow.forEach(o -> row.add(o));
>>>
>>> rows.add(row);
>>> }
>>>
>>> promise.tryComplete(rows);
>>> } catch(Exception ex) {
>>> ex.printStackTrace();
>>> }
>>> }
>>>
>>> Integer providerId = 1;
>>> String carCode = "FOO";
>>>
>>> query("select car_id from car_code where provider_id = ? and
>>> car_code = ? order by car_id asc limit 1;", 3000, providerId, cardCode);
>>>
>>>
>>>
>>> On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov 
>>> wrote:
>>>
 Hi John and Don,

 I guess the root cause in the data types mismatch between table
 schema and actual data at the store or type of the query parameter.
 To explore the gap, it would be very handy if you could provide a
 small reproducer (standalone project or PR somewhere).

 > In my case I'm not even using UUID fields. Also the same code 2
 diff environment dev vs prod doesn't cause the issue. I'm lucky enough 
 that
 it's on dev and prod is ok.
 >
 > But that last part might be misleading because in prod I think it
 happened early on during upgrade and all I did was recreate the sql 
 table.
 >
 > So before I do the same on dev... I want to see what the issue is.
 >
 > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
 >
 >> I‘m only speculating but this looks very similar to the issue I
 had last week and reported to the group here.
 >>
 >> Caused by: org.h2.message.DbException: Hexadecimal string with
 odd number of characters: "5" [90003-197]


 --
 With best regards,

Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-31 Thread John Smith
Ok but since I dropped and recreated the table I'm fine? It won't somehow
throw that error again? And if I upgrade to 2.13 from 2.12 will I have the
same issue?

On Wed, Aug 31, 2022 at 3:31 PM Alex Plehanov 
wrote:

> John Smith,
>
> Thank you. This issue will be fixed in upcoming 2.14.
>
> ср, 31 авг. 2022 г. в 21:50, John Smith :
>
>> Here it is... And yes I recently upgraded to 2.12 from 2.8.1
>>
>> create table if not exists car_code (
>> provider_id int,
>> car_id int,
>> car_code varchar(16),
>> primary key (provider_id, car_id)
>> ) with "template=replicatedTpl, key_type=CarCodeKey, value_type=CarCode";
>>
>> On Wed, Aug 31, 2022 at 7:25 AM Alex Plehanov 
>> wrote:
>>
>>> John Smith,
>>>
>>> Can you please show DDL for the car_code table? Does PK of this table
>>> include provider_id or car_code columns?
>>> I found a compatibility issue, with the same behaviour, it happens when
>>> storage created with Ignite version before 2.11 is used with the newer
>>> Ignite version. Have you upgraded the dev environment with existing storage
>>> recently (before starting to get this error)?
>>>
>>>
>>> чт, 4 авг. 2022 г. в 17:06, John Smith :
>>>
 Let me know if that makes any sense, because the test data is the same
 and the application code is the same. Only dropped and created the table
 again using DbEaver.

 On Wed, Aug 3, 2022 at 11:39 AM John Smith 
 wrote:

> Hi, so I dropped the table and simply recreated it. Did NOT restart
> the application.
>
> Now it works fine.
>
> On Wed, Aug 3, 2022 at 9:58 AM John Smith 
> wrote:
>
>> How? The code is 100% the same between production and dev. And it's
>> part of a bigger application.
>>
>> Only dev has the issue. I will drop and recreate the table if that
>> fixes the issue then what?
>>
>> You are saying mismatch, it's a string period.
>>
>> "select car_id from car_code where provider_id = ? and car_code = ? 
>> order by car_id asc limit 1;"
>>
>>
>> The first parameter is Integer and the second one is String. there's
>> no way this can mismatch... And even if the String was a UUID it's still 
>> a
>> string.
>>
>> public JsonArray query(final String sql, final long timeoutMs,
>> final Object... args) {
>> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
>> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>>
>> try (QueryCursor> cursor = cache.query(query)) {
>> List rows = new ArrayList<>();
>> Iterator> iterator = cursor.iterator();
>>
>> while(iterator.hasNext()) {
>> List currentRow = iterator.next();
>> JsonArray row = new JsonArray();
>>
>> currentRow.forEach(o -> row.add(o));
>>
>> rows.add(row);
>> }
>>
>> promise.tryComplete(rows);
>> } catch(Exception ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> Integer providerId = 1;
>> String carCode = "FOO";
>>
>> query("select car_id from car_code where provider_id = ? and
>> car_code = ? order by car_id asc limit 1;", 3000, providerId, cardCode);
>>
>>
>>
>> On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov 
>> wrote:
>>
>>> Hi John and Don,
>>>
>>> I guess the root cause in the data types mismatch between table
>>> schema and actual data at the store or type of the query parameter.
>>> To explore the gap, it would be very handy if you could provide a
>>> small reproducer (standalone project or PR somewhere).
>>>
>>> > In my case I'm not even using UUID fields. Also the same code 2
>>> diff environment dev vs prod doesn't cause the issue. I'm lucky enough 
>>> that
>>> it's on dev and prod is ok.
>>> >
>>> > But that last part might be misleading because in prod I think it
>>> happened early on during upgrade and all I did was recreate the sql 
>>> table.
>>> >
>>> > So before I do the same on dev... I want to see what the issue is.
>>> >
>>> > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
>>> >
>>> >> I‘m only speculating but this looks very similar to the issue I
>>> had last week and reported to the group here.
>>> >>
>>> >> Caused by: org.h2.message.DbException: Hexadecimal string with
>>> odd number of characters: "5" [90003-197]
>>>
>>>
>>> --
>>> With best regards,
>>> Taras Ledkov
>>>
>>


Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-31 Thread Alex Plehanov
John Smith,

Thank you. This issue will be fixed in upcoming 2.14.

ср, 31 авг. 2022 г. в 21:50, John Smith :

> Here it is... And yes I recently upgraded to 2.12 from 2.8.1
>
> create table if not exists car_code (
> provider_id int,
> car_id int,
> car_code varchar(16),
> primary key (provider_id, car_id)
> ) with "template=replicatedTpl, key_type=CarCodeKey, value_type=CarCode";
>
> On Wed, Aug 31, 2022 at 7:25 AM Alex Plehanov 
> wrote:
>
>> John Smith,
>>
>> Can you please show DDL for the car_code table? Does PK of this table
>> include provider_id or car_code columns?
>> I found a compatibility issue, with the same behaviour, it happens when
>> storage created with Ignite version before 2.11 is used with the newer
>> Ignite version. Have you upgraded the dev environment with existing storage
>> recently (before starting to get this error)?
>>
>>
>> чт, 4 авг. 2022 г. в 17:06, John Smith :
>>
>>> Let me know if that makes any sense, because the test data is the same
>>> and the application code is the same. Only dropped and created the table
>>> again using DbEaver.
>>>
>>> On Wed, Aug 3, 2022 at 11:39 AM John Smith 
>>> wrote:
>>>
 Hi, so I dropped the table and simply recreated it. Did NOT restart the
 application.

 Now it works fine.

 On Wed, Aug 3, 2022 at 9:58 AM John Smith 
 wrote:

> How? The code is 100% the same between production and dev. And it's
> part of a bigger application.
>
> Only dev has the issue. I will drop and recreate the table if that
> fixes the issue then what?
>
> You are saying mismatch, it's a string period.
>
> "select car_id from car_code where provider_id = ? and car_code = ? order 
> by car_id asc limit 1;"
>
>
> The first parameter is Integer and the second one is String. there's
> no way this can mismatch... And even if the String was a UUID it's still a
> string.
>
> public JsonArray query(final String sql, final long timeoutMs,
> final Object... args) {
> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>
> try (QueryCursor> cursor = cache.query(query)) {
> List rows = new ArrayList<>();
> Iterator> iterator = cursor.iterator();
>
> while(iterator.hasNext()) {
> List currentRow = iterator.next();
> JsonArray row = new JsonArray();
>
> currentRow.forEach(o -> row.add(o));
>
> rows.add(row);
> }
>
> promise.tryComplete(rows);
> } catch(Exception ex) {
> ex.printStackTrace();
> }
> }
>
> Integer providerId = 1;
> String carCode = "FOO";
>
> query("select car_id from car_code where provider_id = ? and
> car_code = ? order by car_id asc limit 1;", 3000, providerId, cardCode);
>
>
>
> On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov 
> wrote:
>
>> Hi John and Don,
>>
>> I guess the root cause in the data types mismatch between table
>> schema and actual data at the store or type of the query parameter.
>> To explore the gap, it would be very handy if you could provide a
>> small reproducer (standalone project or PR somewhere).
>>
>> > In my case I'm not even using UUID fields. Also the same code 2
>> diff environment dev vs prod doesn't cause the issue. I'm lucky enough 
>> that
>> it's on dev and prod is ok.
>> >
>> > But that last part might be misleading because in prod I think it
>> happened early on during upgrade and all I did was recreate the sql 
>> table.
>> >
>> > So before I do the same on dev... I want to see what the issue is.
>> >
>> > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
>> >
>> >> I‘m only speculating but this looks very similar to the issue I
>> had last week and reported to the group here.
>> >>
>> >> Caused by: org.h2.message.DbException: Hexadecimal string with odd
>> number of characters: "5" [90003-197]
>>
>>
>> --
>> With best regards,
>> Taras Ledkov
>>
>


Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-31 Thread John Smith
Here it is... And yes I recently upgraded to 2.12 from 2.8.1

create table if not exists car_code (
provider_id int,
car_id int,
car_code varchar(16),
primary key (provider_id, car_id)
) with "template=replicatedTpl, key_type=CarCodeKey, value_type=CarCode";

On Wed, Aug 31, 2022 at 7:25 AM Alex Plehanov 
wrote:

> John Smith,
>
> Can you please show DDL for the car_code table? Does PK of this table
> include provider_id or car_code columns?
> I found a compatibility issue, with the same behaviour, it happens when
> storage created with Ignite version before 2.11 is used with the newer
> Ignite version. Have you upgraded the dev environment with existing storage
> recently (before starting to get this error)?
>
>
> чт, 4 авг. 2022 г. в 17:06, John Smith :
>
>> Let me know if that makes any sense, because the test data is the same
>> and the application code is the same. Only dropped and created the table
>> again using DbEaver.
>>
>> On Wed, Aug 3, 2022 at 11:39 AM John Smith 
>> wrote:
>>
>>> Hi, so I dropped the table and simply recreated it. Did NOT restart the
>>> application.
>>>
>>> Now it works fine.
>>>
>>> On Wed, Aug 3, 2022 at 9:58 AM John Smith 
>>> wrote:
>>>
 How? The code is 100% the same between production and dev. And it's
 part of a bigger application.

 Only dev has the issue. I will drop and recreate the table if that
 fixes the issue then what?

 You are saying mismatch, it's a string period.

 "select car_id from car_code where provider_id = ? and car_code = ? order 
 by car_id asc limit 1;"


 The first parameter is Integer and the second one is String. there's no
 way this can mismatch... And even if the String was a UUID it's still a
 string.

 public JsonArray query(final String sql, final long timeoutMs,
 final Object... args) {
 SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
 query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);

 try (QueryCursor> cursor = cache.query(query)) {
 List rows = new ArrayList<>();
 Iterator> iterator = cursor.iterator();

 while(iterator.hasNext()) {
 List currentRow = iterator.next();
 JsonArray row = new JsonArray();

 currentRow.forEach(o -> row.add(o));

 rows.add(row);
 }

 promise.tryComplete(rows);
 } catch(Exception ex) {
 ex.printStackTrace();
 }
 }

 Integer providerId = 1;
 String carCode = "FOO";

 query("select car_id from car_code where provider_id = ? and
 car_code = ? order by car_id asc limit 1;", 3000, providerId, cardCode);



 On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov  wrote:

> Hi John and Don,
>
> I guess the root cause in the data types mismatch between table schema
> and actual data at the store or type of the query parameter.
> To explore the gap, it would be very handy if you could provide a
> small reproducer (standalone project or PR somewhere).
>
> > In my case I'm not even using UUID fields. Also the same code 2 diff
> environment dev vs prod doesn't cause the issue. I'm lucky enough that 
> it's
> on dev and prod is ok.
> >
> > But that last part might be misleading because in prod I think it
> happened early on during upgrade and all I did was recreate the sql table.
> >
> > So before I do the same on dev... I want to see what the issue is.
> >
> > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
> >
> >> I‘m only speculating but this looks very similar to the issue I had
> last week and reported to the group here.
> >>
> >> Caused by: org.h2.message.DbException: Hexadecimal string with odd
> number of characters: "5" [90003-197]
>
>
> --
> With best regards,
> Taras Ledkov
>



Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-31 Thread Alex Plehanov
John Smith,

Can you please show DDL for the car_code table? Does PK of this table
include provider_id or car_code columns?
I found a compatibility issue, with the same behaviour, it happens when
storage created with Ignite version before 2.11 is used with the newer
Ignite version. Have you upgraded the dev environment with existing storage
recently (before starting to get this error)?


чт, 4 авг. 2022 г. в 17:06, John Smith :

> Let me know if that makes any sense, because the test data is the same and
> the application code is the same. Only dropped and created the table again
> using DbEaver.
>
> On Wed, Aug 3, 2022 at 11:39 AM John Smith  wrote:
>
>> Hi, so I dropped the table and simply recreated it. Did NOT restart the
>> application.
>>
>> Now it works fine.
>>
>> On Wed, Aug 3, 2022 at 9:58 AM John Smith  wrote:
>>
>>> How? The code is 100% the same between production and dev. And it's part
>>> of a bigger application.
>>>
>>> Only dev has the issue. I will drop and recreate the table if that fixes
>>> the issue then what?
>>>
>>> You are saying mismatch, it's a string period.
>>>
>>> "select car_id from car_code where provider_id = ? and car_code = ? order 
>>> by car_id asc limit 1;"
>>>
>>>
>>> The first parameter is Integer and the second one is String. there's no
>>> way this can mismatch... And even if the String was a UUID it's still a
>>> string.
>>>
>>> public JsonArray query(final String sql, final long timeoutMs, final
>>> Object... args) {
>>> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
>>> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>>>
>>> try (QueryCursor> cursor = cache.query(query)) {
>>> List rows = new ArrayList<>();
>>> Iterator> iterator = cursor.iterator();
>>>
>>> while(iterator.hasNext()) {
>>> List currentRow = iterator.next();
>>> JsonArray row = new JsonArray();
>>>
>>> currentRow.forEach(o -> row.add(o));
>>>
>>> rows.add(row);
>>> }
>>>
>>> promise.tryComplete(rows);
>>> } catch(Exception ex) {
>>> ex.printStackTrace();
>>> }
>>> }
>>>
>>> Integer providerId = 1;
>>> String carCode = "FOO";
>>>
>>> query("select car_id from car_code where provider_id = ? and
>>> car_code = ? order by car_id asc limit 1;", 3000, providerId, cardCode);
>>>
>>>
>>>
>>> On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov  wrote:
>>>
 Hi John and Don,

 I guess the root cause in the data types mismatch between table schema
 and actual data at the store or type of the query parameter.
 To explore the gap, it would be very handy if you could provide a small
 reproducer (standalone project or PR somewhere).

 > In my case I'm not even using UUID fields. Also the same code 2 diff
 environment dev vs prod doesn't cause the issue. I'm lucky enough that it's
 on dev and prod is ok.
 >
 > But that last part might be misleading because in prod I think it
 happened early on during upgrade and all I did was recreate the sql table.
 >
 > So before I do the same on dev... I want to see what the issue is.
 >
 > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
 >
 >> I‘m only speculating but this looks very similar to the issue I had
 last week and reported to the group here.
 >>
 >> Caused by: org.h2.message.DbException: Hexadecimal string with odd
 number of characters: "5" [90003-197]


 --
 With best regards,
 Taras Ledkov

>>>


Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-04 Thread John Smith
Let me know if that makes any sense, because the test data is the same and
the application code is the same. Only dropped and created the table again
using DbEaver.

On Wed, Aug 3, 2022 at 11:39 AM John Smith  wrote:

> Hi, so I dropped the table and simply recreated it. Did NOT restart the
> application.
>
> Now it works fine.
>
> On Wed, Aug 3, 2022 at 9:58 AM John Smith  wrote:
>
>> How? The code is 100% the same between production and dev. And it's part
>> of a bigger application.
>>
>> Only dev has the issue. I will drop and recreate the table if that fixes
>> the issue then what?
>>
>> You are saying mismatch, it's a string period.
>>
>> "select car_id from car_code where provider_id = ? and car_code = ? order by 
>> car_id asc limit 1;"
>>
>>
>> The first parameter is Integer and the second one is String. there's no
>> way this can mismatch... And even if the String was a UUID it's still a
>> string.
>>
>> public JsonArray query(final String sql, final long timeoutMs, final
>> Object... args) {
>> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
>> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>>
>> try (QueryCursor> cursor = cache.query(query)) {
>> List rows = new ArrayList<>();
>> Iterator> iterator = cursor.iterator();
>>
>> while(iterator.hasNext()) {
>> List currentRow = iterator.next();
>> JsonArray row = new JsonArray();
>>
>> currentRow.forEach(o -> row.add(o));
>>
>> rows.add(row);
>> }
>>
>> promise.tryComplete(rows);
>> } catch(Exception ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> Integer providerId = 1;
>> String carCode = "FOO";
>>
>> query("select car_id from car_code where provider_id = ? and car_code
>> = ? order by car_id asc limit 1;", 3000, providerId, cardCode);
>>
>>
>>
>> On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov  wrote:
>>
>>> Hi John and Don,
>>>
>>> I guess the root cause in the data types mismatch between table schema
>>> and actual data at the store or type of the query parameter.
>>> To explore the gap, it would be very handy if you could provide a small
>>> reproducer (standalone project or PR somewhere).
>>>
>>> > In my case I'm not even using UUID fields. Also the same code 2 diff
>>> environment dev vs prod doesn't cause the issue. I'm lucky enough that it's
>>> on dev and prod is ok.
>>> >
>>> > But that last part might be misleading because in prod I think it
>>> happened early on during upgrade and all I did was recreate the sql table.
>>> >
>>> > So before I do the same on dev... I want to see what the issue is.
>>> >
>>> > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
>>> >
>>> >> I‘m only speculating but this looks very similar to the issue I had
>>> last week and reported to the group here.
>>> >>
>>> >> Caused by: org.h2.message.DbException: Hexadecimal string with odd
>>> number of characters: "5" [90003-197]
>>>
>>>
>>> --
>>> With best regards,
>>> Taras Ledkov
>>>
>>


Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-03 Thread John Smith
Hi, so I dropped the table and simply recreated it. Did NOT restart the
application.

Now it works fine.

On Wed, Aug 3, 2022 at 9:58 AM John Smith  wrote:

> How? The code is 100% the same between production and dev. And it's part
> of a bigger application.
>
> Only dev has the issue. I will drop and recreate the table if that fixes
> the issue then what?
>
> You are saying mismatch, it's a string period.
>
> "select car_id from car_code where provider_id = ? and car_code = ? order by 
> car_id asc limit 1;"
>
>
> The first parameter is Integer and the second one is String. there's no
> way this can mismatch... And even if the String was a UUID it's still a
> string.
>
> public JsonArray query(final String sql, final long timeoutMs, final
> Object... args) {
> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>
> try (QueryCursor> cursor = cache.query(query)) {
> List rows = new ArrayList<>();
> Iterator> iterator = cursor.iterator();
>
> while(iterator.hasNext()) {
> List currentRow = iterator.next();
> JsonArray row = new JsonArray();
>
> currentRow.forEach(o -> row.add(o));
>
> rows.add(row);
> }
>
> promise.tryComplete(rows);
> } catch(Exception ex) {
> ex.printStackTrace();
> }
> }
>
> Integer providerId = 1;
> String carCode = "FOO";
>
> query("select car_id from car_code where provider_id = ? and car_code
> = ? order by car_id asc limit 1;", 3000, providerId, cardCode);
>
>
>
> On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov  wrote:
>
>> Hi John and Don,
>>
>> I guess the root cause in the data types mismatch between table schema
>> and actual data at the store or type of the query parameter.
>> To explore the gap, it would be very handy if you could provide a small
>> reproducer (standalone project or PR somewhere).
>>
>> > In my case I'm not even using UUID fields. Also the same code 2 diff
>> environment dev vs prod doesn't cause the issue. I'm lucky enough that it's
>> on dev and prod is ok.
>> >
>> > But that last part might be misleading because in prod I think it
>> happened early on during upgrade and all I did was recreate the sql table.
>> >
>> > So before I do the same on dev... I want to see what the issue is.
>> >
>> > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
>> >
>> >> I‘m only speculating but this looks very similar to the issue I had
>> last week and reported to the group here.
>> >>
>> >> Caused by: org.h2.message.DbException: Hexadecimal string with odd
>> number of characters: "5" [90003-197]
>>
>>
>> --
>> With best regards,
>> Taras Ledkov
>>
>


Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-03 Thread John Smith
How? The code is 100% the same between production and dev. And it's part of
a bigger application.

Only dev has the issue. I will drop and recreate the table if that fixes
the issue then what?

You are saying mismatch, it's a string period.

"select car_id from car_code where provider_id = ? and car_code = ?
order by car_id asc limit 1;"


The first parameter is Integer and the second one is String. there's no way
this can mismatch... And even if the String was a UUID it's still a string.

public JsonArray query(final String sql, final long timeoutMs, final
Object... args) {
SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);

try (QueryCursor> cursor = cache.query(query)) {
List rows = new ArrayList<>();
Iterator> iterator = cursor.iterator();

while(iterator.hasNext()) {
List currentRow = iterator.next();
JsonArray row = new JsonArray();

currentRow.forEach(o -> row.add(o));

rows.add(row);
}

promise.tryComplete(rows);
} catch(Exception ex) {
ex.printStackTrace();
}
}

Integer providerId = 1;
String carCode = "FOO";

query("select car_id from car_code where provider_id = ? and car_code =
? order by car_id asc limit 1;", 3000, providerId, cardCode);



On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov  wrote:

> Hi John and Don,
>
> I guess the root cause in the data types mismatch between table schema and
> actual data at the store or type of the query parameter.
> To explore the gap, it would be very handy if you could provide a small
> reproducer (standalone project or PR somewhere).
>
> > In my case I'm not even using UUID fields. Also the same code 2 diff
> environment dev vs prod doesn't cause the issue. I'm lucky enough that it's
> on dev and prod is ok.
> >
> > But that last part might be misleading because in prod I think it
> happened early on during upgrade and all I did was recreate the sql table.
> >
> > So before I do the same on dev... I want to see what the issue is.
> >
> > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
> >
> >> I‘m only speculating but this looks very similar to the issue I had
> last week and reported to the group here.
> >>
> >> Caused by: org.h2.message.DbException: Hexadecimal string with odd
> number of characters: "5" [90003-197]
>
>
> --
> With best regards,
> Taras Ledkov
>


Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-03 Thread Taras Ledkov
Hi John and Don,

I guess the root cause in the data types mismatch between table schema and 
actual data at the store or type of the query parameter.
To explore the gap, it would be very handy if you could provide a small 
reproducer (standalone project or PR somewhere).

> In my case I'm not even using UUID fields. Also the same code 2 diff 
> environment dev vs prod doesn't cause the issue. I'm lucky enough that it's 
> on dev and prod is ok.
> 
> But that last part might be misleading because in prod I think it happened 
> early on during upgrade and all I did was recreate the sql table.
> 
> So before I do the same on dev... I want to see what the issue is.
> 
> On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
> 
>> I‘m only speculating but this looks very similar to the issue I had last 
>> week and reported to the group here.
>>
>> Caused by: org.h2.message.DbException: Hexadecimal string with odd number of 
>> characters: "5" [90003-197]


--
With best regards,
Taras Ledkov


Re: Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-03 Thread John Smith
In my case I'm not even using UUID fields. Also the same code 2 diff
environment dev vs prod doesn't cause the issue. I'm lucky enough that it's
on dev and prod is ok.

But that last part might be misleading because in prod I think it happened
early on during upgrade and all I did was recreate the sql table.

So before I do the same on dev... I want to see what the issue is.

On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:

> I‘m only speculating but this looks very similar to the issue I had last
> week and reported to the group here.
>
> Caused by: org.h2.message.DbException: Hexadecimal string with odd number
> of characters: "5" [90003-197]
>
> Why does H2 think it’s hex String format? For me it turned out H2 was
> wrongly thinking my column data is UUID format, even though it was
> configured as regular String class. Most data in a column was text like
> ‚abc‘ or similar text. But there were also some values that were actually
> UUIDs but still converted to String for this column.
>
> So when I then searched for using SqlFieldsQuery with arguments for a
> value that was a UUID as String I got a similar exception.
>
> I am still trying to create a smaller repro case, that’s why I haven’t
> described my solution in more detail in my other thread yet.
>
>
>
> On 02.08.22 at 23:04, John Smith wrote:
>
> From: "John Smith" 
> Date: 2. August 2022
> To: user@ignite.apache.org
> Cc:
> Subject: Re: What does javax.cache.CacheException: Failed to execute map
> query on remote node mean?
> Here it is...
>
> [20:58:03,050][SEVERE][query-#395344%xx%][GridMapQueryExecutor] Failed
> to execute local query.
> class org.apache.ignite.internal.processors.query.IgniteSQLException:
> General error: "class org.apache.ignite.IgniteCheckedException: Runtime
> failure on lookup row: IndexSearchRowImpl
> [rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]";
> SQL statement:
> SELECT
> __Z0.CAR_ID __C0_0
> FROM PUBLIC.CAR_CODE __Z0
> WHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)
> ORDER BY 1 LIMIT 1 [5-197]
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:875)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:962)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:454)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:274)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.onMessage(IgniteH2Indexing.java:2187)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.lambda$start$22(IgniteH2Indexing.java:2132)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:3480)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:242)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
> at
> org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: org.h2.jdbc.JdbcSQLException: General error: "class
> org.apache.ignite.IgniteCheckedException: Runtime failure on lookup row:
> IndexSearchRowImpl
> [rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]";
> SQL statement:
> SELECT
> __Z0.CAR_ID __C0_0
> FROM PUBLIC.CAR_CODE __Z0
> WHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)
> ORDER BY 1 LIMIT 1 [5-197]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
> at org.h2.message.DbException.get(DbException.java:168)
> at org.h2.message.DbException.convert(DbException.java:307)
> at
> org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.find(H2TreeIndex.java:214)
> at org.h2.index.BaseIndex.find(BaseIndex.java:130)
> at org.h2.index.IndexCursor.find(IndexCursor.java:176)
> at org.h2.table.TableFilter.next(TableFilter.java:471)
> at
> org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1452)
> at org.h2.result.L

Re: Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-02 Thread don . tequila



I‘m only speculating but this looks very similar to the issue I had last week and reported to the group here.Caused by: org.h2.message.DbException: Hexadecimal string with odd number of characters: "5" [90003-197]Why does H2 think it’s hex String format? For me it turned out H2 was wrongly thinking my column data is UUID format, even though it was configured as regular String class. Most data in a column was text like ‚abc‘ or similar text. But there were also some values that were actually UUIDs but still converted to String for this column.So when I then searched for using SqlFieldsQuery with arguments for a value that was a UUID as String I got a similar exception.I am still trying to create a smaller repro case, that’s why I haven’t described my solution in more detail in my other thread yet.On 02.08.22 at 23:04, John Smith wrote:




From: "John Smith" Date: 2. August 2022To: user@ignite.apache.orgCc: Subject: Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

Here it is...[20:58:03,050][SEVERE][query-#395344%xx%][GridMapQueryExecutor] Failed to execute local query.class org.apache.ignite.internal.processors.query.IgniteSQLException: General error: "class org.apache.ignite.IgniteCheckedException: Runtime failure on lookup row: IndexSearchRowImpl [rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]"; SQL statement:SELECT__Z0.CAR_ID __C0_0FROM PUBLIC.CAR_CODE __Z0WHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)ORDER BY 1 LIMIT 1 [5-197]	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:875)	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:962)	at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:454)	at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:274)	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.onMessage(IgniteH2Indexing.java:2187)	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.lambda$start$22(IgniteH2Indexing.java:2132)	at org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:3480)	at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)	at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)	at org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:242)	at org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)	at org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)	at java.lang.Thread.run(Thread.java:748)Caused by: org.h2.jdbc.JdbcSQLException: General error: "class org.apache.ignite.IgniteCheckedException: Runtime failure on lookup row: IndexSearchRowImpl [rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]"; SQL statement:SELECT__Z0.CAR_ID __C0_0FROM PUBLIC.CAR_CODE __Z0WHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)ORDER BY 1 LIMIT 1 [5-197]	at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)	at org.h2.message.DbException.get(DbException.java:168)	at org.h2.message.DbException.convert(DbException.java:307)	at org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.find(H2TreeIndex.java:214)	at org.h2.index.BaseIndex.find(BaseIndex.java:130)	at org.h2.index.IndexCursor.find(IndexCursor.java:176)	at org.h2.table.TableFilter.next(TableFilter.java:471)	at org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1452)	at org.h2.result.LazyResult.hasNext(LazyResult.java:79)	at org.h2.result.LazyResult.next(LazyResult.java:59)	at org.h2.command.dml.Select.queryFlat(Select.java:527)	at org.h2.command.dml.Select.queryWithoutCache(Select.java:633)	at org.h2.command.dml.Query.queryWithoutCacheLazyCheck(Query.java:114)	at org.h2.command.dml.Query.query(Query.java:352)	at org.h2.command.dml.Query.query(Query.java:333)	at org.h2.command.CommandContainer.query(CommandContainer.java:114)	at org.h2.command.Command.executeQuery(Command.java:202)	at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:114)	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:865)	... 14 moreCaused by: class org.apache.ignite.IgniteCheckedException: Runtime f

Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-02 Thread John Smith
Here it is...

[20:58:03,050][SEVERE][query-#395344%xx%][GridMapQueryExecutor] Failed
to execute local query.
class org.apache.ignite.internal.processors.query.IgniteSQLException:
General error: "class org.apache.ignite.IgniteCheckedException: Runtime
failure on lookup row: IndexSearchRowImpl
[rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]";
SQL statement:
SELECT
__Z0.CAR_ID __C0_0
FROM PUBLIC.CAR_CODE __Z0
WHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)
ORDER BY 1 LIMIT 1 [5-197]
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:875)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:962)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:454)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:274)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.onMessage(IgniteH2Indexing.java:2187)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.lambda$start$22(IgniteH2Indexing.java:2132)
at
org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:3480)
at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
at
org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:242)
at
org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
at
org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.h2.jdbc.JdbcSQLException: General error: "class
org.apache.ignite.IgniteCheckedException: Runtime failure on lookup row:
IndexSearchRowImpl
[rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]";
SQL statement:
SELECT
__Z0.CAR_ID __C0_0
FROM PUBLIC.CAR_CODE __Z0
WHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)
ORDER BY 1 LIMIT 1 [5-197]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:307)
at
org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.find(H2TreeIndex.java:214)
at org.h2.index.BaseIndex.find(BaseIndex.java:130)
at org.h2.index.IndexCursor.find(IndexCursor.java:176)
at org.h2.table.TableFilter.next(TableFilter.java:471)
at
org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1452)
at org.h2.result.LazyResult.hasNext(LazyResult.java:79)
at org.h2.result.LazyResult.next(LazyResult.java:59)
at org.h2.command.dml.Select.queryFlat(Select.java:527)
at org.h2.command.dml.Select.queryWithoutCache(Select.java:633)
at org.h2.command.dml.Query.queryWithoutCacheLazyCheck(Query.java:114)
at org.h2.command.dml.Query.query(Query.java:352)
at org.h2.command.dml.Query.query(Query.java:333)
at org.h2.command.CommandContainer.query(CommandContainer.java:114)
at org.h2.command.Command.executeQuery(Command.java:202)
at
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:114)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:865)
... 14 more
Caused by: class org.apache.ignite.IgniteCheckedException: Runtime failure
on lookup row: IndexSearchRowImpl
[rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd
]
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findOne(BPlusTree.java:1387)
at
org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexImpl.find(InlineIndexImpl.java:101)
at
org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.find(H2TreeIndex.java:207)
... 29 more
Caused by: class org.apache.ignite.IgniteCheckedException: Rows cannot be
compared
at
org.apache.ignite.internal.processors.query.h2.index.H2RowComparator.compareValues(H2RowComparator.java:152)
at
org.apache.ignite.internal.processors.query.h2.index.H2RowComparator.compareRow(H2RowComparator.java:117)
at
org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexTree.compareFullRows(InlineIndexTree.java:358)
at
org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexTree.compare(InlineIndexTree.java:338)
at
org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexTree.compare(InlineIndexTree.java:71)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.compare(BPl

Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-02 Thread Николай Ижиков
Hello, John.

Provided stack trace not enough to answer your question.
Can you, please, provide log from the remote node?

> 2 авг. 2022 г., в 17:14, John Smith  написал(а):
> 
> Anyone?
> 
> On Fri, Jul 29, 2022 at 8:44 AM John Smith  > wrote:
> Any thoughts on this?
> 
> On Mon., Jul. 25, 2022, 11:29 a.m. John Smith,  > wrote:
> Hi I have the following code and I get the below exception. The cache runs on 
> 3 remote nodes and it is accessed by thick client (client = true)
> 
> String sql = "select car_id from car_code where provider_id = ? and car_code 
> = ? order by car_id asc limit 1;"
> Integer providerId = 1;
> String cardCode = "HONDA";
> 
> JssonArray array = query(sql, 3000, providerId, carCode); 
> 
> JsonArray query(final String sql, final long timeoutMs, final Object... args) 
> {
> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
> 
> try (QueryCursor> cursor = cache.query(query)) {
> List rows = new ArrayList<>();
> Iterator> iterator = cursor.iterator();
> 
> while(iterator.hasNext()) {
> List currentRow = iterator.next();
> JsonArray row = new JsonArray();
> 
> currentRow.forEach(o -> row.add(o));
> 
> rows.add(row);
> }
> 
> return rows;
> } catch(Exception ex) {
> ex.printStackTrace();
> }
> }
> 
> Running this in Datagrip with JDBC client works fine;
> 
> select
> car_id
> from car_code
> where provider_id = 5 and car_code = 'HONDA'
> order by car_id asc limit 1;
> 
> Works
> 
> 
> javax.cache.CacheException: Failed to execute map query on remote node 
> [nodeId=xx, errMsg=General error: \"class 
> org.apache.ignite.IgniteCheckedException: Runtime failure on lookup row: 
> IndexSearchRowImpl 
> [rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]\";
>  SQL statement:
> \nSELECT
> \n__Z0.CAR_ID __C0_0
> \nFROM PUBLIC.CAR_CODE __Z0
> \nWHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)
> \nORDER BY 1 LIMIT 1 [5-197]]
> \n\tat 
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.fail(GridReduceQueryExecutor.java:235)
> \n\tat 
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.onFail(GridReduceQueryExecutor.java:214)
> \n\tat 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.onMessage(IgniteH2Indexing.java:2193)
> \n\tat 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.lambda$start$22(IgniteH2Indexing.java:2132)
> \n\tat 
> org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:3480)
> \n\tat 
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
> \n\tat 
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
> \n\tat 
> org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:242)
> \n\tat 
> org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
> \n\tat 
> org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
> \n\tat 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> \n\tat 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> \n\tat java.lang.Thread.run(Thread.java:748)
> \n



Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-08-02 Thread John Smith
Anyone?

On Fri, Jul 29, 2022 at 8:44 AM John Smith  wrote:

> Any thoughts on this?
>
> On Mon., Jul. 25, 2022, 11:29 a.m. John Smith, 
> wrote:
>
>> Hi I have the following code and I get the below exception. The cache
>> runs on 3 remote nodes and it is accessed by thick client (client = true)
>>
>> String sql = "select car_id from car_code where provider_id = ? and
>> car_code = ? order by car_id asc limit 1;"
>> Integer providerId = 1;
>> String cardCode = "HONDA";
>>
>> JssonArray array = query(sql, 3000, providerId, carCode);
>>
>> JsonArray query(final String sql, final long timeoutMs, final Object...
>> args) {
>> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
>> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>>
>> try (QueryCursor> cursor = cache.query(query)) {
>> List rows = new ArrayList<>();
>> Iterator> iterator = cursor.iterator();
>>
>> while(iterator.hasNext()) {
>> List currentRow = iterator.next();
>> JsonArray row = new JsonArray();
>>
>> currentRow.forEach(o -> row.add(o));
>>
>> rows.add(row);
>> }
>>
>> return rows;
>> } catch(Exception ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> Running this in Datagrip with JDBC client works fine;
>>
>> select
>> car_id
>> from car_code
>> where provider_id = 5 and car_code = 'HONDA'
>> order by car_id asc limit 1;
>>
>> Works
>>
>>
>> javax.cache.CacheException: Failed to execute map query on remote node
>> [nodeId=xx, errMsg=General error: \"class
>> org.apache.ignite.IgniteCheckedException: Runtime failure on lookup row:
>> IndexSearchRowImpl
>> [rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]\";
>> SQL statement:
>> \nSELECT
>> \n__Z0.CAR_ID __C0_0
>> \nFROM PUBLIC.CAR_CODE __Z0
>> \nWHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)
>> \nORDER BY 1 LIMIT 1 [5-197]]
>> \n\tat
>> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.fail(GridReduceQueryExecutor.java:235)
>> \n\tat
>> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.onFail(GridReduceQueryExecutor.java:214)
>> \n\tat
>> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.onMessage(IgniteH2Indexing.java:2193)
>> \n\tat
>> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.lambda$start$22(IgniteH2Indexing.java:2132)
>> \n\tat
>> org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:3480)
>> \n\tat
>> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
>> \n\tat
>> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
>> \n\tat
>> org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:242)
>> \n\tat
>> org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
>> \n\tat
>> org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
>> \n\tat
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>> \n\tat
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>> \n\tat java.lang.Thread.run(Thread.java:748)
>> \n
>>
>


Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-07-29 Thread John Smith
Any thoughts on this?

On Mon., Jul. 25, 2022, 11:29 a.m. John Smith, 
wrote:

> Hi I have the following code and I get the below exception. The cache runs
> on 3 remote nodes and it is accessed by thick client (client = true)
>
> String sql = "select car_id from car_code where provider_id = ? and
> car_code = ? order by car_id asc limit 1;"
> Integer providerId = 1;
> String cardCode = "HONDA";
>
> JssonArray array = query(sql, 3000, providerId, carCode);
>
> JsonArray query(final String sql, final long timeoutMs, final Object...
> args) {
> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>
> try (QueryCursor> cursor = cache.query(query)) {
> List rows = new ArrayList<>();
> Iterator> iterator = cursor.iterator();
>
> while(iterator.hasNext()) {
> List currentRow = iterator.next();
> JsonArray row = new JsonArray();
>
> currentRow.forEach(o -> row.add(o));
>
> rows.add(row);
> }
>
> return rows;
> } catch(Exception ex) {
> ex.printStackTrace();
> }
> }
>
> Running this in Datagrip with JDBC client works fine;
>
> select
> car_id
> from car_code
> where provider_id = 5 and car_code = 'HONDA'
> order by car_id asc limit 1;
>
> Works
>
>
> javax.cache.CacheException: Failed to execute map query on remote node
> [nodeId=xx, errMsg=General error: \"class
> org.apache.ignite.IgniteCheckedException: Runtime failure on lookup row:
> IndexSearchRowImpl
> [rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@16bc23dd]\";
> SQL statement:
> \nSELECT
> \n__Z0.CAR_ID __C0_0
> \nFROM PUBLIC.CAR_CODE __Z0
> \nWHERE (__Z0.PROVIDER_ID = ?1) AND (__Z0.CAR_CODE = ?2)
> \nORDER BY 1 LIMIT 1 [5-197]]
> \n\tat
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.fail(GridReduceQueryExecutor.java:235)
> \n\tat
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.onFail(GridReduceQueryExecutor.java:214)
> \n\tat
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.onMessage(IgniteH2Indexing.java:2193)
> \n\tat
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.lambda$start$22(IgniteH2Indexing.java:2132)
> \n\tat
> org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:3480)
> \n\tat
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
> \n\tat
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
> \n\tat
> org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:242)
> \n\tat
> org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
> \n\tat
> org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
> \n\tat
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> \n\tat
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> \n\tat java.lang.Thread.run(Thread.java:748)
> \n
>