Hi all,

I’m new to Ignite and I’ve this problem, I want to reate/declare a simple 
schema whit name « KSDATA » in IGNITE XML [default-config.xml].

Here is what I have :

[centos@ip-10-200-2-102 ~]$ cat /opt/app/ignite/2.7.0/config/default-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="     
http://www.springframework.org/schema/beans     
http://www.springframework.org/schema/beans/spring-beans.xsd";>
  <!--
                                Alter configuration below as needed.
                -->
  <bean id="grid.cfg" 
class="org.apache.ignite.configuration.IgniteConfiguration">
    <property name="discoverySpi">
      <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="ipFinder">
          <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
            <property name="addresses">
              <list>
                
<value>10.200.2.102</value><value>10.200.2.105</value><value>10.200.4.103</value><value>10.200.4.106</value><value>10.200.6.101</value><value>10.200.6.104</value>
              </list>
            </property>
          </bean>
        </property>
      </bean>
    </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>
    <property name="communicationSpi">
      <bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
        <property name="localPort" value="4321"/>
      </bean>
    </property>
    <property name="authenticationEnabled" value="true"/>
  </bean>
  <bean id="cache-template-bean" abstract="true" 
class="org.apache.ignite.configuration.CacheConfiguration">
    <property name="name" value="ksdata"/>
    <property name="cacheMode" value="PARTITIONED" />
    <property name="backups" value="1" />
  </bean>
</beans>

When I use JDBC client (client & server 2.6.0 or 2.7.0) It seems conenct well 
but any SQL is not run with following java exception :

...
drop table if exists benchmark
java.sql.SQLException: Failed to set schema for DB connection for thread 
[schema=KSDATA]
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475)
       at 
com.gfi.rt.lib.database.connectors.jdbc.CxObjJDBC.ExecuteDML(CxObjJDBC.java:238)
       at 
com.gfi.rt.lib.database.connectors.jdbc.CxObjJDBC.TableDrop(CxObjJDBC.java:659)
       at com.gfi.rt.lib.database.connectors.CxTable.drop(CxTable.java:114)
       at com.gfi.rt.lib.database.connectors.CxTable.drop(CxTable.java:122)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.launch(BenchmarkMain.java:248)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.<init>(BenchmarkMain.java:100)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.main(BenchmarkMain.java:42)
create table benchmark (id NUMERIC(10) primary key,C001 VARCHAR(30),C002 
float,C003 float,C004 NUMERIC(10),C005 NUMERIC(10),C006 NUMERIC(10),C007 
NUMERIC(10),C008 NUMERIC(10),C009 VARCHAR(30),C010 VARCHAR(30),C011 DATE,C012 
VARCHAR(30),C013 VARCHAR(30),C014 VARCHAR(30),C015 NUMERIC(10),C016 float,C017 
VARCHAR(30),C018 VARCHAR(30),C019 VARCHAR(30)) WITH "backups=1, affinityKey=id"
java.sql.SQLException: Failed to set schema for DB connection for thread 
[schema=KSDATA]
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475)
       at 
com.gfi.rt.lib.database.connectors.jdbc.CxObjJDBC.ExecuteDML(CxObjJDBC.java:238)
       at 
com.gfi.rt.lib.database.connectors.jdbc.CxObjJDBC.TableCreate(CxObjJDBC.java:634)
       at com.gfi.rt.lib.database.connectors.CxTable.create(CxTable.java:63)
       at com.gfi.rt.lib.database.connectors.CxTable.create(CxTable.java:71)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.launch(BenchmarkMain.java:269)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.<init>(BenchmarkMain.java:100)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.main(BenchmarkMain.java:42)
create index benchmarkc001 on benchmark(c001)
java.sql.SQLException: Table doesn't exist: BENCHMARK
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
       at 
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475)
       at 
com.gfi.rt.lib.database.connectors.jdbc.CxObjJDBC.ExecuteDML(CxObjJDBC.java:238)
       at 
com.gfi.rt.lib.database.connectors.jdbc.CxObjJDBC.TableIndexCreate(CxObjJDBC.java:647)
       at com.gfi.rt.lib.database.connectors.CxTable.addIndex(CxTable.java:81)
       at com.gfi.rt.lib.database.connectors.CxTable.addIndexes(CxTable.java:96)
       at 
com.gfi.rt.lib.database.connectors.CxTable.addIndexes(CxTable.java:104)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.launch(BenchmarkMain.java:270)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.<init>(BenchmarkMain.java:100)
       at 
com.gfi.rt.bin.database.dbbench.BenchmarkMain.main(BenchmarkMain.java:42)
...

And so on ☹

Any full running java JDBC example will be welcome, or best my XML correction 😊

Cordialement,

—
NOTE : n/a
—
Gfi Informatique
Philippe Cerou
Architecte & Expert Système
GFI Production / Toulouse
philippe.cerou @gfi.fr
—
1 Rond-point du Général Eisenhower, 31400 Toulouse
Tél. : +33 (0)5.62.85.11.55
Mob. : +33 (0)6.03.56.48.62
www.gfi.world<http://www.gfi.world/>
—
[Facebook]<https://www.facebook.com/gfiinformatique> [Twitter] 
<https://twitter.com/gfiinformatique>  [Instagram] 
<https://www.instagram.com/gfiinformatique/>  [LinkedIn] 
<https://www.linkedin.com/company/gfi-informatique>  [YouTube] 
<https://www.youtube.com/user/GFIinformatique>
—
[cid:image006.jpg@01D2F97F.AA6ABB50]<http://www.gfi.world/>


Reply via email to