ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Eriksson <tobias.eriks...@qvantel.com>
Subject Why do I get table not found exception when trying do execute SQL on some tables but not others...
Date Fri, 03 Nov 2017 14:42:02 GMT
Hi
 I have my tables in  Cassandra as a persistence store for Apache Ignite
Now one of my tables “alpha” works just fine, I can run SQL from “SQuirreL SQL”
BUT some of the other tables it cannot
Yet in the UI of “SQuirreL SQL”, all the tables are visible
BUT doing a SELECT count(*) FROM pojoprofile does not work
Exception below
What am I missing ?
-Tobias

********* ALPHA ************
<persistence keyspace="ignite" table="alpha">
    <keyspaceOptions>
        REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1}
        AND DURABLE_WRITES = true
    </keyspaceOptions>

    <keyPersistence class="java.lang.Long" strategy="PRIMITIVE"/>

    <valuePersistence class="com.qvantel.research.common.Alpha"
                      strategy="BLOB"
                      serializer="org.apache.ignite.cache.store.cassandra.serializer.KryoSerializer"
                      column="data"/>
</persistence>


<bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="cache_alpha"/>
                    <property name="atomicityMode" value="ATOMIC"/>
                    <property name="backups" value="1"/>
                    <property name="indexedTypes">
                        <list>
                            <value>java.lang.Long</value>
                            <value>com.qvantel.research.common.Alpha</value>
                        </list>
                    </property>
                    <property name="readThrough" value="true"/>
                    <property name="writeThrough" value="true"/>
                    <property name="cacheStoreFactory">
                        <bean class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory">
                            <property name="dataSourceBean" value="cassandraDataSource"/>
                            <property name="persistenceSettingsBean" value="persistence_settings_alpha"/>
                        </bean>
                    </property>
                </bean>



******* POJOPROFILE *************
<persistence keyspace="ignite" table="pojoprofile" ttl="86400">
    <keyspaceOptions>
        REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1}
        AND DURABLE_WRITES = true
    </keyspaceOptions>
    <tableOption>
        comment = 'Cache test'
        AND read_repair_chance = 0.2
    </tableOption>
    <keyPersistence class="java.lang.Long" strategy="PRIMITIVE" column="profile_id"/>
    <valuePersistence class="com.qvantel.research.common.PojoProfile" strategy="POJO"/>
</persistence>


<bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="cache_pojoprofile"/>
                    <property name="atomicityMode" value="ATOMIC"/>
                    <property name="backups" value="1"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="indexedTypes">
                        <list>
                            <value>java.lang.Long</value>
                            <value>com.qvantel.research.common.PojoProfile</value>
                        </list>
                    </property>
                    <property name="readThrough" value="true"/>
                    <property name="writeThrough" value="true"/>
                    <property name="cacheStoreFactory">
                        <bean class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory">
                            <property name="dataSourceBean" value="cassandraDataSource"/>
                            <property name="persistenceSettingsBean" value="persistence_settings_pojo"/>
                        </bean>
                    </property>
                    <property name="expiryPolicyFactory">
                        <bean id="expiryPolicy" class="javax.cache.expiry.CreatedExpiryPolicy"
                              factory-method="factoryOf">
                            <constructor-arg>
                                <bean class="javax.cache.expiry.Duration">
                                    <constructor-arg value="SECONDS"/>
                                    <constructor-arg value="60"/>
                                </bean>
                            </constructor-arg>
                        </bean>
                    </property>
</bean>


javax.cache.CacheException: class org.apache.ignite.internal.processors.query.IgniteSQLException:
Failed to parse query: select count(*) from POJOPROFILE
                at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:807)
                at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:765)
                at org.apache.ignite.internal.processors.cache.query.jdbc.GridCacheQueryJdbcTask$JdbcDriverJob.execute(GridCacheQueryJdbcTask.java:273)
                at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:566)
                at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6610)
                at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:560)
                at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:489)
                at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
                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: class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to
parse query: select count(*) from POJOPROFILE
                at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1293)
                at org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:1815)
                at org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:1813)
                at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
                at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2293)
                at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1820)
                at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:795)
                ... 10 more
Caused by: org.h2.jdbc.JdbcSQLException: Table "POJOPROFILE" not found; SQL statement:
select count(*) from POJOPROFILE [42102-195]
                at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
                at org.h2.message.DbException.get(DbException.java:179)
                at org.h2.message.DbException.get(DbException.java:155)
                at org.h2.command.Parser.readTableOrView(Parser.java:5506)
                at org.h2.command.Parser.readTableFilter(Parser.java:1260)
                at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1940)
                at org.h2.command.Parser.parseSelectSimple(Parser.java:2089)
                at org.h2.command.Parser.parseSelectSub(Parser.java:1934)
                at org.h2.command.Parser.parseSelectUnion(Parser.java:1749)
                at org.h2.command.Parser.parseSelect(Parser.java:1737)
                at org.h2.command.Parser.parsePrepared(Parser.java:448)
                at org.h2.command.Parser.parse(Parser.java:320)
                at org.h2.command.Parser.parse(Parser.java:292)
                at org.h2.command.Parser.prepareCommand(Parser.java:257)
                at org.h2.engine.Session.prepareLocal(Session.java:573)
                at org.h2.engine.Session.prepareCommand(Session.java:514)
                at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204)
                at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:73)
                at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288)
                at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatement(IgniteH2Indexing.java:398)
                at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1273)
                ... 16 more


--
Tobias Eriksson
Chief Architect Research – CTO Office
Qvantel Sweden AB
Tel; +46 768 832453
e-mail; Tobias.Eriksson@qvantel.com<mailto:Tobias.Eriksson@qvantel.com>


Mime
View raw message