Hi guys !
I am not in any way sure that I'm on the right track here so please bear with
me.
I have a single node running with my cache:
[10:48:34,480][INFO][main][IgniteKernal] Configured caches [in 'sysMemPlc'
dataRegion: ['ignite-sys-cache'], in 'default' dataRegion: ['tokenCache']]
I want my table "Token" to use the "tokenCacheTemplate" configuration and I
want to use native persistence (no 3rd. party db.)
I am connecting with DBeaver with the following connect string:
jdbc:ignite:cfg://file:///D:\apache-ignite-fabric-2.3.0-bin\config\gatekeeper-token-config.xml
(I can connect to jdbc:ignite:thin://127.0.0.1 but then I'll just be connected
to ignite-sys-cache - seemingly.)
I get a connection but once I try to create a table I get:
SQL Error: Failed to query Ignite.
Failed to query Ignite.
Ouch! Argument is invalid: Cache name must not be null or empty.
The table def. is :
CREATE TABLE IF NOT EXISTS Token
(
id bigint,
token VARCHAR,
PRIMARY KEY (id)
)
WITH "template=tokenCacheTemplate";
Where <tokenCacheTemplate> is defined in the above config file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="cacheConfiguration">
<list>
<bean id="tokenCacheTemplate"
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="tokenCache" />
<property name="cacheMode" value="PARTITIONED" />
<property name="backups" value="1" />
<!--<property name="readThrough" value="true"/>-->
<!-- read from db if doesn't exist in cache -->
</bean>
</list>
</property>
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean
class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="persistenceEnabled" value="true" />
</bean>
</property>
</bean>
</property>
</bean>
Thanks!