You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by narges saleh <sn...@gmail.com> on 2020/01/19 23:46:39 UTC

Native Persistence & JDBC

Hi All

I am using JDBC connection for inserting data into caches specified in my
config file (via query entities). If I don't enable native persistence,
everything works fine and I can insert the data into cache/table and query
the cache/table. But if I enable native persistence, the client dies as
soon it attempts to create the JDBC connection, using the configuration
file, with this error:

SQLException: Client is invalid. Probably cache name is wrong.

The connection command is this:

Connection conn = DriverManager.getConnection(
"jdbc:ignite:cfg://cache=PERSON2:streaming=true:streamingFlushFrequency=2000
@file:///opt/ignite/config/query-entity-store.xml");

Any idea what could I be doing wrong?

thanks.

Re: Native Persistence & JDBC

Posted by Denis Magda <dm...@apache.org>.
Forwarding this thread to the dev list.

Ignite SQL experts, could you check this thread and create a proper ticket
for this minor usability improvement? Probably, the ticket is not even
needed.

Basically, our driver reports this error - *SQLException: Client is
invalid. Probably cache name is wrong - *if the cluster with persistence is
deactivated while the error message needs to advise to activate the
cluster instead.

-
Denis


On Tue, Jan 21, 2020 at 4:54 PM narges saleh <sn...@gmail.com> wrote:

> Hello Ilya,
> It seems the issue was that I had not enabled the cluster. I'd have
> expected a different type of error.
> Now that I enabled the cluster, the code works with native persistence.
> thanks.
>
> On Tue, Jan 21, 2020 at 5:36 AM Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> Can you please provide complete error message, with stack traces if
>> present?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> пн, 20 янв. 2020 г. в 21:03, narges saleh <sn...@gmail.com>:
>>
>>> Hello Ilya
>>>
>>> I do have the PERSON2 cache. Here is the snippet for the cache
>>> configuration. I don't have any issue with this configuration if I don't
>>> enable native persistence.
>>>
>>> <property name="cacheConfiguration">
>>> <list>
>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>> <property name="name" value="PERSON2"/>
>>> <property name="cacheMode" value="PARTITIONED"/>
>>> <property name="atomicityMode" value="ATOMIC"/>
>>> <property name="writeSynchronizationMode" value="FULL_SYNC"/>
>>>
>>> <!-- Configure type metadata to enable queries. -->
>>> <property name="queryEntities">
>>> <list>
>>> <bean class="org.apache.ignite.cache.QueryEntity"
>>>
>>> On Mon, Jan 20, 2020 at 10:40 AM Ilya Kasnacheev <
>>> ilya.kasnacheev@gmail.com> wrote:
>>>
>>>> Hello!
>>>>
>>>> Maybe you don't have PERSON2 cache? :)
>>>>
>>>> Regards,
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> пн, 20 янв. 2020 г. в 02:47, narges saleh <sn...@gmail.com>:
>>>>
>>>>> Hi All
>>>>>
>>>>> I am using JDBC connection for inserting data into caches specified in
>>>>> my config file (via query entities). If I don't enable native persistence,
>>>>> everything works fine and I can insert the data into cache/table and query
>>>>> the cache/table. But if I enable native persistence, the client dies as
>>>>> soon it attempts to create the JDBC connection, using the configuration
>>>>> file, with this error:
>>>>>
>>>>> SQLException: Client is invalid. Probably cache name is wrong.
>>>>>
>>>>> The connection command is this:
>>>>>
>>>>> Connection conn = DriverManager.getConnection(
>>>>> "jdbc:ignite:cfg://cache=PERSON2:streaming=true:streamingFlushFrequency=
>>>>> 2000@file:///opt/ignite/config/query-entity-store.xml");
>>>>>
>>>>> Any idea what could I be doing wrong?
>>>>>
>>>>> thanks.
>>>>>
>>>>

Re: Native Persistence & JDBC

Posted by Denis Magda <dm...@apache.org>.
Forwarding this thread to the dev list.

Ignite SQL experts, could you check this thread and create a proper ticket
for this minor usability improvement? Probably, the ticket is not even
needed.

Basically, our driver reports this error - *SQLException: Client is
invalid. Probably cache name is wrong - *if the cluster with persistence is
deactivated while the error message needs to advise to activate the
cluster instead.

-
Denis


On Tue, Jan 21, 2020 at 4:54 PM narges saleh <sn...@gmail.com> wrote:

> Hello Ilya,
> It seems the issue was that I had not enabled the cluster. I'd have
> expected a different type of error.
> Now that I enabled the cluster, the code works with native persistence.
> thanks.
>
> On Tue, Jan 21, 2020 at 5:36 AM Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> Can you please provide complete error message, with stack traces if
>> present?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> пн, 20 янв. 2020 г. в 21:03, narges saleh <sn...@gmail.com>:
>>
>>> Hello Ilya
>>>
>>> I do have the PERSON2 cache. Here is the snippet for the cache
>>> configuration. I don't have any issue with this configuration if I don't
>>> enable native persistence.
>>>
>>> <property name="cacheConfiguration">
>>> <list>
>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>> <property name="name" value="PERSON2"/>
>>> <property name="cacheMode" value="PARTITIONED"/>
>>> <property name="atomicityMode" value="ATOMIC"/>
>>> <property name="writeSynchronizationMode" value="FULL_SYNC"/>
>>>
>>> <!-- Configure type metadata to enable queries. -->
>>> <property name="queryEntities">
>>> <list>
>>> <bean class="org.apache.ignite.cache.QueryEntity"
>>>
>>> On Mon, Jan 20, 2020 at 10:40 AM Ilya Kasnacheev <
>>> ilya.kasnacheev@gmail.com> wrote:
>>>
>>>> Hello!
>>>>
>>>> Maybe you don't have PERSON2 cache? :)
>>>>
>>>> Regards,
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> пн, 20 янв. 2020 г. в 02:47, narges saleh <sn...@gmail.com>:
>>>>
>>>>> Hi All
>>>>>
>>>>> I am using JDBC connection for inserting data into caches specified in
>>>>> my config file (via query entities). If I don't enable native persistence,
>>>>> everything works fine and I can insert the data into cache/table and query
>>>>> the cache/table. But if I enable native persistence, the client dies as
>>>>> soon it attempts to create the JDBC connection, using the configuration
>>>>> file, with this error:
>>>>>
>>>>> SQLException: Client is invalid. Probably cache name is wrong.
>>>>>
>>>>> The connection command is this:
>>>>>
>>>>> Connection conn = DriverManager.getConnection(
>>>>> "jdbc:ignite:cfg://cache=PERSON2:streaming=true:streamingFlushFrequency=
>>>>> 2000@file:///opt/ignite/config/query-entity-store.xml");
>>>>>
>>>>> Any idea what could I be doing wrong?
>>>>>
>>>>> thanks.
>>>>>
>>>>

Re: Native Persistence & JDBC

Posted by narges saleh <sn...@gmail.com>.
Hello Ilya,
It seems the issue was that I had not enabled the cluster. I'd have
expected a different type of error.
Now that I enabled the cluster, the code works with native persistence.
thanks.

On Tue, Jan 21, 2020 at 5:36 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Can you please provide complete error message, with stack traces if
> present?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пн, 20 янв. 2020 г. в 21:03, narges saleh <sn...@gmail.com>:
>
>> Hello Ilya
>>
>> I do have the PERSON2 cache. Here is the snippet for the cache
>> configuration. I don't have any issue with this configuration if I don't
>> enable native persistence.
>>
>> <property name="cacheConfiguration">
>> <list>
>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>> <property name="name" value="PERSON2"/>
>> <property name="cacheMode" value="PARTITIONED"/>
>> <property name="atomicityMode" value="ATOMIC"/>
>> <property name="writeSynchronizationMode" value="FULL_SYNC"/>
>>
>> <!-- Configure type metadata to enable queries. -->
>> <property name="queryEntities">
>> <list>
>> <bean class="org.apache.ignite.cache.QueryEntity"
>>
>> On Mon, Jan 20, 2020 at 10:40 AM Ilya Kasnacheev <
>> ilya.kasnacheev@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> Maybe you don't have PERSON2 cache? :)
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> пн, 20 янв. 2020 г. в 02:47, narges saleh <sn...@gmail.com>:
>>>
>>>> Hi All
>>>>
>>>> I am using JDBC connection for inserting data into caches specified in
>>>> my config file (via query entities). If I don't enable native persistence,
>>>> everything works fine and I can insert the data into cache/table and query
>>>> the cache/table. But if I enable native persistence, the client dies as
>>>> soon it attempts to create the JDBC connection, using the configuration
>>>> file, with this error:
>>>>
>>>> SQLException: Client is invalid. Probably cache name is wrong.
>>>>
>>>> The connection command is this:
>>>>
>>>> Connection conn = DriverManager.getConnection(
>>>> "jdbc:ignite:cfg://cache=PERSON2:streaming=true:streamingFlushFrequency=
>>>> 2000@file:///opt/ignite/config/query-entity-store.xml");
>>>>
>>>> Any idea what could I be doing wrong?
>>>>
>>>> thanks.
>>>>
>>>

Re: Native Persistence & JDBC

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Can you please provide complete error message, with stack traces if present?

Regards,
-- 
Ilya Kasnacheev


пн, 20 янв. 2020 г. в 21:03, narges saleh <sn...@gmail.com>:

> Hello Ilya
>
> I do have the PERSON2 cache. Here is the snippet for the cache
> configuration. I don't have any issue with this configuration if I don't
> enable native persistence.
>
> <property name="cacheConfiguration">
> <list>
> <bean class="org.apache.ignite.configuration.CacheConfiguration">
> <property name="name" value="PERSON2"/>
> <property name="cacheMode" value="PARTITIONED"/>
> <property name="atomicityMode" value="ATOMIC"/>
> <property name="writeSynchronizationMode" value="FULL_SYNC"/>
>
> <!-- Configure type metadata to enable queries. -->
> <property name="queryEntities">
> <list>
> <bean class="org.apache.ignite.cache.QueryEntity"
>
> On Mon, Jan 20, 2020 at 10:40 AM Ilya Kasnacheev <
> ilya.kasnacheev@gmail.com> wrote:
>
>> Hello!
>>
>> Maybe you don't have PERSON2 cache? :)
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> пн, 20 янв. 2020 г. в 02:47, narges saleh <sn...@gmail.com>:
>>
>>> Hi All
>>>
>>> I am using JDBC connection for inserting data into caches specified in
>>> my config file (via query entities). If I don't enable native persistence,
>>> everything works fine and I can insert the data into cache/table and query
>>> the cache/table. But if I enable native persistence, the client dies as
>>> soon it attempts to create the JDBC connection, using the configuration
>>> file, with this error:
>>>
>>> SQLException: Client is invalid. Probably cache name is wrong.
>>>
>>> The connection command is this:
>>>
>>> Connection conn = DriverManager.getConnection(
>>> "jdbc:ignite:cfg://cache=PERSON2:streaming=true:streamingFlushFrequency=
>>> 2000@file:///opt/ignite/config/query-entity-store.xml");
>>>
>>> Any idea what could I be doing wrong?
>>>
>>> thanks.
>>>
>>

Re: Native Persistence & JDBC

Posted by narges saleh <sn...@gmail.com>.
Hello Ilya

I do have the PERSON2 cache. Here is the snippet for the cache
configuration. I don't have any issue with this configuration if I don't
enable native persistence.

<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="PERSON2"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="writeSynchronizationMode" value="FULL_SYNC"/>

<!-- Configure type metadata to enable queries. -->
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity"

On Mon, Jan 20, 2020 at 10:40 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Maybe you don't have PERSON2 cache? :)
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пн, 20 янв. 2020 г. в 02:47, narges saleh <sn...@gmail.com>:
>
>> Hi All
>>
>> I am using JDBC connection for inserting data into caches specified in my
>> config file (via query entities). If I don't enable native persistence,
>> everything works fine and I can insert the data into cache/table and query
>> the cache/table. But if I enable native persistence, the client dies as
>> soon it attempts to create the JDBC connection, using the configuration
>> file, with this error:
>>
>> SQLException: Client is invalid. Probably cache name is wrong.
>>
>> The connection command is this:
>>
>> Connection conn = DriverManager.getConnection(
>> "jdbc:ignite:cfg://cache=PERSON2:streaming=true:streamingFlushFrequency=
>> 2000@file:///opt/ignite/config/query-entity-store.xml");
>>
>> Any idea what could I be doing wrong?
>>
>> thanks.
>>
>

Re: Native Persistence & JDBC

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Maybe you don't have PERSON2 cache? :)

Regards,
-- 
Ilya Kasnacheev


пн, 20 янв. 2020 г. в 02:47, narges saleh <sn...@gmail.com>:

> Hi All
>
> I am using JDBC connection for inserting data into caches specified in my
> config file (via query entities). If I don't enable native persistence,
> everything works fine and I can insert the data into cache/table and query
> the cache/table. But if I enable native persistence, the client dies as
> soon it attempts to create the JDBC connection, using the configuration
> file, with this error:
>
> SQLException: Client is invalid. Probably cache name is wrong.
>
> The connection command is this:
>
> Connection conn = DriverManager.getConnection(
> "jdbc:ignite:cfg://cache=PERSON2:streaming=true:streamingFlushFrequency=
> 2000@file:///opt/ignite/config/query-entity-store.xml");
>
> Any idea what could I be doing wrong?
>
> thanks.
>