You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by John Smith <ja...@gmail.com> on 2022/07/25 15:29:05 UTC

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

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<List<?>> cursor = cache.query(query)) {
            List<JsonArray> rows = new ArrayList<>();
            Iterator<List<?>> 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=xxxxxx, 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 [50000-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?

Posted by Alex Plehanov <pl...@gmail.com>.
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 <ja...@gmail.com>:

> 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 <pl...@gmail.com>
> wrote:
>
>> John Smith,
>>
>> Thank you. This issue will be fixed in upcoming 2.14.
>>
>> ср, 31 авг. 2022 г. в 21:50, John Smith <ja...@gmail.com>:
>>
>>> 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 <pl...@gmail.com>
>>> 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 <ja...@gmail.com>:
>>>>
>>>>> 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 <ja...@gmail.com>
>>>>> 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 <ja...@gmail.com>
>>>>>> 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<List<?>> cursor = cache.query(query)) {
>>>>>>>             List<JsonArray> rows = new ArrayList<>();
>>>>>>>             Iterator<List<?>> 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 <tl...@apache.org>
>>>>>>> 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. , <do...@gmx.de> 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?

Posted by John Smith <ja...@gmail.com>.
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 <pl...@gmail.com>
wrote:

> John Smith,
>
> Thank you. This issue will be fixed in upcoming 2.14.
>
> ср, 31 авг. 2022 г. в 21:50, John Smith <ja...@gmail.com>:
>
>> 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 <pl...@gmail.com>
>> 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 <ja...@gmail.com>:
>>>
>>>> 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 <ja...@gmail.com>
>>>> 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 <ja...@gmail.com>
>>>>> 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<List<?>> cursor = cache.query(query)) {
>>>>>>             List<JsonArray> rows = new ArrayList<>();
>>>>>>             Iterator<List<?>> 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 <tl...@apache.org>
>>>>>> 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. , <do...@gmx.de> 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?

Posted by Alex Plehanov <pl...@gmail.com>.
John Smith,

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

ср, 31 авг. 2022 г. в 21:50, John Smith <ja...@gmail.com>:

> 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 <pl...@gmail.com>
> 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 <ja...@gmail.com>:
>>
>>> 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 <ja...@gmail.com>
>>> 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 <ja...@gmail.com>
>>>> 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<List<?>> cursor = cache.query(query)) {
>>>>>             List<JsonArray> rows = new ArrayList<>();
>>>>>             Iterator<List<?>> 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 <tl...@apache.org>
>>>>> 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. , <do...@gmx.de> 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?

Posted by John Smith <ja...@gmail.com>.
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 <pl...@gmail.com>
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 <ja...@gmail.com>:
>
>> 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 <ja...@gmail.com>
>> 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 <ja...@gmail.com>
>>> 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<List<?>> cursor = cache.query(query)) {
>>>>             List<JsonArray> rows = new ArrayList<>();
>>>>             Iterator<List<?>> 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 <tl...@apache.org> 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. , <do...@gmx.de> 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?

Posted by Alex Plehanov <pl...@gmail.com>.
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 <ja...@gmail.com>:

> 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 <ja...@gmail.com> 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 <ja...@gmail.com> 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<List<?>> cursor = cache.query(query)) {
>>>             List<JsonArray> rows = new ArrayList<>();
>>>             Iterator<List<?>> 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 <tl...@apache.org> 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. , <do...@gmx.de> 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?

Posted by John Smith <ja...@gmail.com>.
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 <ja...@gmail.com> 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 <ja...@gmail.com> 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<List<?>> cursor = cache.query(query)) {
>>             List<JsonArray> rows = new ArrayList<>();
>>             Iterator<List<?>> 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 <tl...@apache.org> 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. , <do...@gmx.de> 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?

Posted by John Smith <ja...@gmail.com>.
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 <ja...@gmail.com> 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<List<?>> cursor = cache.query(query)) {
>             List<JsonArray> rows = new ArrayList<>();
>             Iterator<List<?>> 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 <tl...@apache.org> 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. , <do...@gmx.de> 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?

Posted by John Smith <ja...@gmail.com>.
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<List<?>> cursor = cache.query(query)) {
            List<JsonArray> rows = new ArrayList<>();
            Iterator<List<?>> 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 <tl...@apache.org> 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. , <do...@gmx.de> 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?

Posted by Taras Ledkov <tl...@apache.org>.
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. , <do...@gmx.de> 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?

Posted by John Smith <ja...@gmail.com>.
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. , <do...@gmx.de> 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" <ja...@gmail.com>
> 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%xxxxxx%][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 [50000-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 [50000-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(BPlusTree.java:5430)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findInsertionPoint(BPlusTree.java:5350)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.access$1100(BPlusTree.java:100)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Search.run0(BPlusTree.java:307)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5944)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Search.run(BPlusTree.java:287)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5930)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler.readPage(PageHandler.java:174)
> at
> org.apache.ignite.internal.processors.cache.persistence.DataStructure.read(DataStructure.java:415)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.read(BPlusTree.java:6131)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findDown(BPlusTree.java:1449)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doFind(BPlusTree.java:1416)
> at
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findOne(BPlusTree.java:1379)
> ... 31 more
> Caused by: org.h2.message.DbException: Hexadecimal string with odd number
> of characters: "5" [90003-197]
> at org.h2.message.DbException.get(DbException.java:179)
> at org.h2.message.DbException.get(DbException.java:155)
> at org.h2.util.StringUtils.convertHexToBytes(StringUtils.java:913)
> at org.h2.value.Value.convertTo(Value.java:1078)
> at org.h2.value.Value.convertTo(Value.java:617)
> at org.h2.value.Value.convertTo(Value.java:592)
> at org.h2.table.Table.compareTypeSafe(Table.java:1187)
> at
> org.apache.ignite.internal.processors.query.h2.index.H2RowComparator.compareValues(H2RowComparator.java:149)
> ... 48 more
> Caused by: org.h2.jdbc.JdbcSQLException: Hexadecimal string with odd
> number of characters: "5" [90003-197]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
> ... 56 more
>
> On Tue, Aug 2, 2022 at 10:33 AM Николай Ижиков <ni...@apache.org>
> wrote:
>
>> 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 <ja...@gmail.com> написал(а):
>>
>> Anyone?
>>
>> On Fri, Jul 29, 2022 at 8:44 AM John Smith <ja...@gmail.com>
>> wrote:
>>
>>> Any thoughts on this?
>>>
>>> On Mon., Jul. 25, 2022, 11:29 a.m. John Smith, <ja...@gmail.com>
>>> 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<List<?>> cursor = cache.query(query)) {
>>>>             List<JsonArray> rows = new ArrayList<>();
>>>>             Iterator<List<?>> 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=xxxxxx, 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 [50000-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: Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

Posted by do...@gmx.de.
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" <ja...@gmail.com>  
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%xxxxxx%][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 [50000-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 [50000-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(BPlusTree.java:5430)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findInsertionPoint(BPlusTree.java:5350)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.access$1100(BPlusTree.java:100)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Search.run0(BPlusTree.java:307)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5944)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Search.run(BPlusTree.java:287)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5930)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler.readPage(PageHandler.java:174)  
at
org.apache.ignite.internal.processors.cache.persistence.DataStructure.read(DataStructure.java:415)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.read(BPlusTree.java:6131)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findDown(BPlusTree.java:1449)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doFind(BPlusTree.java:1416)  
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findOne(BPlusTree.java:1379)  
... 31 more  
Caused by: org.h2.message.DbException: Hexadecimal string with odd number of
characters: "5" [90003-197]  
at org.h2.message.DbException.get(DbException.java:179)  
at org.h2.message.DbException.get(DbException.java:155)  
at org.h2.util.StringUtils.convertHexToBytes(StringUtils.java:913)  
at org.h2.value.Value.convertTo(Value.java:1078)  
at org.h2.value.Value.convertTo(Value.java:617)  
at org.h2.value.Value.convertTo(Value.java:592)  
at org.h2.table.Table.compareTypeSafe(Table.java:1187)  
at
org.apache.ignite.internal.processors.query.h2.index.H2RowComparator.compareValues(H2RowComparator.java:149)  
... 48 more  
Caused by: org.h2.jdbc.JdbcSQLException: Hexadecimal string with odd number of
characters: "5" [90003-197]  
at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)  
... 56 more  

  

On Tue, Aug 2, 2022 at 10:33 AM Николай Ижиков
<[nizhikov@apache.org](mailto:nizhikov@apache.org)> wrote:  

> 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
<[java.dev.mtl@gmail.com](mailto:java.dev.mtl@gmail.com)> написал(а):

>>

>>  
>
>>

>> Anyone?

>>

>>  
>
>>

>> On Fri, Jul 29, 2022 at 8:44 AM John Smith
<[java.dev.mtl@gmail.com](mailto:java.dev.mtl@gmail.com)> wrote:  
>
>>

>>> Any thoughts on this?

>>>

>>>  
>
>>>

>>> On Mon., Jul. 25, 2022, 11:29 a.m. John Smith,
<[java.dev.mtl@gmail.com](mailto:java.dev.mtl@gmail.com)> 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<List<?>> cursor = cache.query(query)) {  
>             List<JsonArray> rows = new ArrayList<>();  
>             Iterator<List<?>> 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=xxxxxx, 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 [50000-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?

Posted by John Smith <ja...@gmail.com>.
Here it is...

[20:58:03,050][SEVERE][query-#395344%xxxxxx%][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 [50000-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 [50000-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(BPlusTree.java:5430)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findInsertionPoint(BPlusTree.java:5350)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.access$1100(BPlusTree.java:100)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Search.run0(BPlusTree.java:307)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5944)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Search.run(BPlusTree.java:287)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5930)
at
org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler.readPage(PageHandler.java:174)
at
org.apache.ignite.internal.processors.cache.persistence.DataStructure.read(DataStructure.java:415)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.read(BPlusTree.java:6131)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findDown(BPlusTree.java:1449)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doFind(BPlusTree.java:1416)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.findOne(BPlusTree.java:1379)
... 31 more
Caused by: org.h2.message.DbException: Hexadecimal string with odd number
of characters: "5" [90003-197]
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.util.StringUtils.convertHexToBytes(StringUtils.java:913)
at org.h2.value.Value.convertTo(Value.java:1078)
at org.h2.value.Value.convertTo(Value.java:617)
at org.h2.value.Value.convertTo(Value.java:592)
at org.h2.table.Table.compareTypeSafe(Table.java:1187)
at
org.apache.ignite.internal.processors.query.h2.index.H2RowComparator.compareValues(H2RowComparator.java:149)
... 48 more
Caused by: org.h2.jdbc.JdbcSQLException: Hexadecimal string with odd number
of characters: "5" [90003-197]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
... 56 more

On Tue, Aug 2, 2022 at 10:33 AM Николай Ижиков <ni...@apache.org> wrote:

> 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 <ja...@gmail.com> написал(а):
>
> Anyone?
>
> On Fri, Jul 29, 2022 at 8:44 AM John Smith <ja...@gmail.com> wrote:
>
>> Any thoughts on this?
>>
>> On Mon., Jul. 25, 2022, 11:29 a.m. John Smith, <ja...@gmail.com>
>> 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<List<?>> cursor = cache.query(query)) {
>>>             List<JsonArray> rows = new ArrayList<>();
>>>             Iterator<List<?>> 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=xxxxxx, 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 [50000-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?

Posted by Николай Ижиков <ni...@apache.org>.
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 <ja...@gmail.com> написал(а):
> 
> Anyone?
> 
> On Fri, Jul 29, 2022 at 8:44 AM John Smith <java.dev.mtl@gmail.com <ma...@gmail.com>> wrote:
> Any thoughts on this?
> 
> On Mon., Jul. 25, 2022, 11:29 a.m. John Smith, <java.dev.mtl@gmail.com <ma...@gmail.com>> 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<List<?>> cursor = cache.query(query)) {
>             List<JsonArray> rows = new ArrayList<>();
>             Iterator<List<?>> 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=xxxxxx, 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 [50000-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?

Posted by John Smith <ja...@gmail.com>.
Anyone?

On Fri, Jul 29, 2022 at 8:44 AM John Smith <ja...@gmail.com> wrote:

> Any thoughts on this?
>
> On Mon., Jul. 25, 2022, 11:29 a.m. John Smith, <ja...@gmail.com>
> 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<List<?>> cursor = cache.query(query)) {
>>             List<JsonArray> rows = new ArrayList<>();
>>             Iterator<List<?>> 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=xxxxxx, 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 [50000-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?

Posted by John Smith <ja...@gmail.com>.
Any thoughts on this?

On Mon., Jul. 25, 2022, 11:29 a.m. John Smith, <ja...@gmail.com>
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<List<?>> cursor = cache.query(query)) {
>             List<JsonArray> rows = new ArrayList<>();
>             Iterator<List<?>> 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=xxxxxx, 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 [50000-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
>