You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by kavitha <ka...@gmail.com> on 2017/03/31 06:25:44 UTC
Indexing is disabled for cache
Hi,
I have successfully loaded cache. If I write query to get data, below
exception occurred.
ERROR [HY000] javax.cache.CacheException: Indexing is disabled for cache:
NORTHWND. Use setIndexedTypes or setTypeMetadata methods on
CacheConfiguration to enable.
So I add indexedTypes property in SpringXML file. But failed to load
SpringXML file. Could you please say me what's wrong in configuration file?
I am not sure whether indexTypes property is correctly set or not.
After adding indexTypes property, configuration is:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="odbcConfiguration">
<bean class="org.apache.ignite.configuration.OdbcConfiguration"/>
</property>
<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="name" value="NORTHWND"/>
<property name="indexedTypes">
<list>
<value>java.lang.Integer</value>
<value>LoadData.Categories</value>
</list>
</property>
<property name="cacheStoreFactory">
<bean
class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
<property name="typeName"
value="LoadData.CategoriesCacheFactory, LoadData"/>
</bean>
</property>
</bean>
</list>
</property>
</bean>
</beans>
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11597.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Indexing is disabled for cache
Posted by Igor Sapego <is...@gridgain.com>.
I don't know how you do it in .NET. You may want to take a look on the
ODBC documentation for the platform you use. I assume [1] may be
helpful for you.
[1] -
https://msdn.microsoft.com/en-us/library/system.data.odbc.odbccommand.createparameter(v=vs.110).aspx
Best Regards,
Igor
On Fri, Mar 31, 2017 at 2:48 PM, kavitha <ka...@gmail.com> wrote:
>
> My value is 'Condiments'. How I set this value in query?
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11612.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Indexing is disabled for cache
Posted by kavitha <ka...@gmail.com>.
My value is 'Condiments'. How I set this value in query?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11612.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Indexing is disabled for cache
Posted by Igor Sapego <is...@gridgain.com>.
Ok, as far as I can see, you have argument in your query. Note the '?'
sign in your statement:
SELECT
__Z0__Z0.CATEGORYID AS __C0_0
FROM NORTHWND.CATEGORIES __Z0__Z0
WHERE __Z0__Z0.CATEGORYNAME = ?1
But you never set this argument to any value.
Best Regards,
Igor
On Fri, Mar 31, 2017 at 2:34 PM, kavitha <ka...@gmail.com> wrote:
> Hi,
>
> Please See complete error message
>
> Mar 31, 2017 5:01:56 PM
> org.springframework.context.support.AbstractApplicationContext
> prepareRefresh
> INFO: Refreshing
> org.springframework.context.support.GenericApplicationContext@7561af7c:
> startup date [Fri Mar 31 17:01:56 IST 2017]; root of context hierarchy
> Mar 31, 2017 5:01:56 PM java.util.logging.LogManager$RootLogger log
> SEVERE: Failed to resolve default logging config file:
> config/java.util.logging.properties
> [17:01:56] __________ ________________
> [17:01:56] / _/ ___/ |/ / _/_ __/ __/
> [17:01:56] _/ // (7 7 // / / / / _/
> [17:01:56] /___/\___/_/|_/___/ /_/ /___/
> [17:01:56]
> [17:01:56] ver. 1.9.0#20170302-sha1:0be92732
> [17:01:56] 2017 Copyright(C) Apache Software Foundation
> [17:01:56]
> [17:01:56] Ignite documentation: http://ignite.apache.org
> [17:01:56]
> [17:01:56] Quiet mode.
> [17:01:56] ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
> or "-v" to ignite.{sh|bat}
> [17:01:56]
> [17:01:56] OS: Windows NT (unknown) 6.2 amd64
> [17:01:56] VM information: Java(TM) SE Runtime Environment 1.7.0-b147
> Oracle
> Corporation Java HotSpot(TM) 64-Bit Server VM 21.0-b17
> [17:01:56] Initial heap size is 124MB (should be no less than 512MB, use
> -Xms512m -Xmx512m).
> [17:01:57] Configured plugins:
> [17:01:57] ^-- None
> [17:01:57]
> [17:01:58] Message queue limit is set to 0 which may lead to potential
> OOMEs
> when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to
> message queues growth on sender and receiver sides.
> [17:01:58] Security status [authentication=off, tls/ssl=off]
> [17:02:00] Persistence store is configured, but both read-through and
> write-through are disabled for cache: NORTHWND
> [17:02:00] Performance suggestions for grid (fix if possible)
> [17:02:00] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
> [17:02:00] ^-- Switch to the most recent 1.8 JVM version
> [17:02:00] ^-- Specify JVM heap max size (add '-Xmx<size>[g|G|m|M|k|K]'
> to
> JVM options)
> [17:02:00] ^-- Set max direct memory size if getting 'OOME: Direct buffer
> memory' (add '-XX:MaxDirectMemorySize=<size>[g|G|m|M|k|K]' to JVM options)
> [17:02:00] ^-- Disable processing of calls to System.gc() (add
> '-XX:+DisableExplicitGC' to JVM options)
> [17:02:00] Refer to this page for more performance suggestions:
> https://apacheignite.readme.io/docs/jvm-and-system-tuning
> [17:02:00]
> [17:02:00] To start Console Management & Monitoring run
> ignitevisorcmd.{sh|bat}
> [17:02:00]
> [17:02:00] Ignite node started OK (id=848e002f)
> [17:02:00] Topology snapshot [ver=1, servers=1, clients=0, CPUs=4,
> heap=1.7GB]
> CategoriesCacheFactory.LoadCache() called.
> Mar 31, 2017 5:02:21 PM org.apache.ignite.logger.java.JavaLogger error
> SEVERE: Failed to execute local query.
> class org.apache.ignite.IgniteCheckedException: Failed to execute SQL
> query.
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.
> executeSqlQuery(IgniteH2Indexing.java:1056)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.
> executeSqlQueryWithTimer(IgniteH2Indexing.java:1108)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.
> executeSqlQueryWithTimer(IgniteH2Indexing.java:1083)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:613)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:489)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:207)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:169)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:167)
> at
> org.apache.ignite.internal.util.lang.IgniteInClosure2X.
> apply(IgniteInClosure2X.java:38)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.send(
> IgniteH2Indexing.java:2130)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1194)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:630)
> at
> org.apache.ignite.internal.processors.query.h2.
> IgniteH2Indexing$7.iterator(IgniteH2Indexing.java:1315)
> at
> org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(
> QueryCursorImpl.java:94)
> at
> org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.fetchQuery(
> OdbcRequestHandler.java:286)
> at
> org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.handle(
> OdbcRequestHandler.java:111)
> at
> org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(
> OdbcNioListener.java:124)
> at
> org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(
> OdbcNioListener.java:33)
> at
> org.apache.ignite.internal.util.nio.GridNioFilterChain$
> TailFilter.onMessageReceived(GridNioFilterChain.java:274)
> at
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.
> proceedMessageReceived(GridNioFilterAdapter.java:107)
> at
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.
> body(GridNioAsyncNotifyFilter.java:95)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.
> run(GridWorkerPool.java:70)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> Caused by: org.h2.jdbc.JdbcSQLException: Parameter "#1" is not set; SQL
> statement:
> SELECT
> __Z0__Z0.CATEGORYID AS __C0_0
> FROM NORTHWND.CATEGORIES __Z0__Z0
> WHERE __Z0__Z0.CATEGORYNAME = ?1 [90012-191]
> 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.expression.Parameter.checkSet(Parameter.java:81)
> at org.h2.command.Prepared.checkParameters(Prepared.java:164)
> at org.h2.command.CommandContainer.query(
> CommandContainer.java:109)
> at org.h2.command.Command.executeQuery(Command.java:201)
> at
> org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:
> 110)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.
> executeSqlQuery(IgniteH2Indexing.java:1049)
> ... 25 more
>
> Mar 31, 2017 5:02:21 PM org.apache.ignite.logger.java.JavaLogger error
> SEVERE: Failed to run map query on local node.
> class org.apache.ignite.IgniteCheckedException: Failed to execute SQL
> query.
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.
> executeSqlQuery(IgniteH2Indexing.java:1056)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.
> executeSqlQueryWithTimer(IgniteH2Indexing.java:1108)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.
> executeSqlQueryWithTimer(IgniteH2Indexing.java:1083)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:613)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:489)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:207)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:169)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:167)
> at
> org.apache.ignite.internal.util.lang.IgniteInClosure2X.
> apply(IgniteInClosure2X.java:38)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.send(
> IgniteH2Indexing.java:2130)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1194)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:630)
> at
> org.apache.ignite.internal.processors.query.h2.
> IgniteH2Indexing$7.iterator(IgniteH2Indexing.java:1315)
> at
> org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(
> QueryCursorImpl.java:94)
> at
> org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.fetchQuery(
> OdbcRequestHandler.java:286)
> at
> org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.handle(
> OdbcRequestHandler.java:111)
> at
> org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(
> OdbcNioListener.java:124)
> at
> org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(
> OdbcNioListener.java:33)
> at
> org.apache.ignite.internal.util.nio.GridNioFilterChain$
> TailFilter.onMessageReceived(GridNioFilterChain.java:274)
> at
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.
> proceedMessageReceived(GridNioFilterAdapter.java:107)
> at
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.
> body(GridNioAsyncNotifyFilter.java:95)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.
> run(GridWorkerPool.java:70)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> Caused by: org.h2.jdbc.JdbcSQLException: Parameter "#1" is not set; SQL
> statement:
> SELECT
> __Z0__Z0.CATEGORYID AS __C0_0
> FROM NORTHWND.CATEGORIES __Z0__Z0
> WHERE __Z0__Z0.CATEGORYNAME = ?1 [90012-191]
> 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.expression.Parameter.checkSet(Parameter.java:81)
> at org.h2.command.Prepared.checkParameters(Prepared.java:164)
> at org.h2.command.CommandContainer.query(
> CommandContainer.java:109)
> at org.h2.command.Command.executeQuery(Command.java:201)
> at
> org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:
> 110)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.
> executeSqlQuery(IgniteH2Indexing.java:1049)
> ... 25 more
>
> Mar 31, 2017 5:02:21 PM org.apache.ignite.logger.java.JavaLogger error
> SEVERE: Failed to fetch SQL query result [reqId=3,
> req=OdbcQueryFetchRequest
> [queryId=0, pageSize=1024]]
> javax.cache.CacheException: Failed to run map query remotely.
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:667)
> at
> org.apache.ignite.internal.processors.query.h2.
> IgniteH2Indexing$7.iterator(IgniteH2Indexing.java:1315)
> at
> org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(
> QueryCursorImpl.java:94)
> at
> org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.fetchQuery(
> OdbcRequestHandler.java:286)
> at
> org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.handle(
> OdbcRequestHandler.java:111)
> at
> org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(
> OdbcNioListener.java:124)
> at
> org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(
> OdbcNioListener.java:33)
> at
> org.apache.ignite.internal.util.nio.GridNioFilterChain$
> TailFilter.onMessageReceived(GridNioFilterChain.java:274)
> at
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.
> proceedMessageReceived(GridNioFilterAdapter.java:107)
> at
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.
> body(GridNioAsyncNotifyFilter.java:95)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.
> run(GridWorkerPool.java:70)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> Caused by: javax.cache.CacheException: Failed to execute map query on the
> node: 848e002f-8ae8-4c8a-bde6-a3a7ab4a9858, class
> org.apache.ignite.IgniteCheckedException:Failed to execute SQL query.
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.fail(GridReduceQueryExecutor.java:283)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.onFail(GridReduceQueryExecutor.java:273)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.onMessage(GridReduceQueryExecutor.java:254)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.sendError(GridMapQueryExecutor.java:701)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:674)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:489)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:207)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:169)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:167)
> at
> org.apache.ignite.internal.util.lang.IgniteInClosure2X.
> apply(IgniteInClosure2X.java:38)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.send(
> IgniteH2Indexing.java:2130)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1194)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.
> GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:630)
> ... 14 more
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11608.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Indexing is disabled for cache
Posted by kavitha <ka...@gmail.com>.
Hi,
Please See complete error message
Mar 31, 2017 5:01:56 PM
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing
org.springframework.context.support.GenericApplicationContext@7561af7c:
startup date [Fri Mar 31 17:01:56 IST 2017]; root of context hierarchy
Mar 31, 2017 5:01:56 PM java.util.logging.LogManager$RootLogger log
SEVERE: Failed to resolve default logging config file:
config/java.util.logging.properties
[17:01:56] __________ ________________
[17:01:56] / _/ ___/ |/ / _/_ __/ __/
[17:01:56] _/ // (7 7 // / / / / _/
[17:01:56] /___/\___/_/|_/___/ /_/ /___/
[17:01:56]
[17:01:56] ver. 1.9.0#20170302-sha1:0be92732
[17:01:56] 2017 Copyright(C) Apache Software Foundation
[17:01:56]
[17:01:56] Ignite documentation: http://ignite.apache.org
[17:01:56]
[17:01:56] Quiet mode.
[17:01:56] ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[17:01:56]
[17:01:56] OS: Windows NT (unknown) 6.2 amd64
[17:01:56] VM information: Java(TM) SE Runtime Environment 1.7.0-b147 Oracle
Corporation Java HotSpot(TM) 64-Bit Server VM 21.0-b17
[17:01:56] Initial heap size is 124MB (should be no less than 512MB, use
-Xms512m -Xmx512m).
[17:01:57] Configured plugins:
[17:01:57] ^-- None
[17:01:57]
[17:01:58] Message queue limit is set to 0 which may lead to potential OOMEs
when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to
message queues growth on sender and receiver sides.
[17:01:58] Security status [authentication=off, tls/ssl=off]
[17:02:00] Persistence store is configured, but both read-through and
write-through are disabled for cache: NORTHWND
[17:02:00] Performance suggestions for grid (fix if possible)
[17:02:00] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[17:02:00] ^-- Switch to the most recent 1.8 JVM version
[17:02:00] ^-- Specify JVM heap max size (add '-Xmx<size>[g|G|m|M|k|K]' to
JVM options)
[17:02:00] ^-- Set max direct memory size if getting 'OOME: Direct buffer
memory' (add '-XX:MaxDirectMemorySize=<size>[g|G|m|M|k|K]' to JVM options)
[17:02:00] ^-- Disable processing of calls to System.gc() (add
'-XX:+DisableExplicitGC' to JVM options)
[17:02:00] Refer to this page for more performance suggestions:
https://apacheignite.readme.io/docs/jvm-and-system-tuning
[17:02:00]
[17:02:00] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[17:02:00]
[17:02:00] Ignite node started OK (id=848e002f)
[17:02:00] Topology snapshot [ver=1, servers=1, clients=0, CPUs=4,
heap=1.7GB]
CategoriesCacheFactory.LoadCache() called.
Mar 31, 2017 5:02:21 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to execute local query.
class org.apache.ignite.IgniteCheckedException: Failed to execute SQL query.
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:1056)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1108)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1083)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:613)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:489)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:207)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:169)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:167)
at
org.apache.ignite.internal.util.lang.IgniteInClosure2X.apply(IgniteInClosure2X.java:38)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.send(IgniteH2Indexing.java:2130)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1194)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:630)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$7.iterator(IgniteH2Indexing.java:1315)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:94)
at
org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.fetchQuery(OdbcRequestHandler.java:286)
at
org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.handle(OdbcRequestHandler.java:111)
at
org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(OdbcNioListener.java:124)
at
org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(OdbcNioListener.java:33)
at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:274)
at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:95)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.h2.jdbc.JdbcSQLException: Parameter "#1" is not set; SQL
statement:
SELECT
__Z0__Z0.CATEGORYID AS __C0_0
FROM NORTHWND.CATEGORIES __Z0__Z0
WHERE __Z0__Z0.CATEGORYNAME = ?1 [90012-191]
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.expression.Parameter.checkSet(Parameter.java:81)
at org.h2.command.Prepared.checkParameters(Prepared.java:164)
at org.h2.command.CommandContainer.query(CommandContainer.java:109)
at org.h2.command.Command.executeQuery(Command.java:201)
at
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:110)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:1049)
... 25 more
Mar 31, 2017 5:02:21 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to run map query on local node.
class org.apache.ignite.IgniteCheckedException: Failed to execute SQL query.
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:1056)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1108)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1083)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:613)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:489)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:207)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:169)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:167)
at
org.apache.ignite.internal.util.lang.IgniteInClosure2X.apply(IgniteInClosure2X.java:38)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.send(IgniteH2Indexing.java:2130)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1194)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:630)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$7.iterator(IgniteH2Indexing.java:1315)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:94)
at
org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.fetchQuery(OdbcRequestHandler.java:286)
at
org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.handle(OdbcRequestHandler.java:111)
at
org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(OdbcNioListener.java:124)
at
org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(OdbcNioListener.java:33)
at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:274)
at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:95)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.h2.jdbc.JdbcSQLException: Parameter "#1" is not set; SQL
statement:
SELECT
__Z0__Z0.CATEGORYID AS __C0_0
FROM NORTHWND.CATEGORIES __Z0__Z0
WHERE __Z0__Z0.CATEGORYNAME = ?1 [90012-191]
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.expression.Parameter.checkSet(Parameter.java:81)
at org.h2.command.Prepared.checkParameters(Prepared.java:164)
at org.h2.command.CommandContainer.query(CommandContainer.java:109)
at org.h2.command.Command.executeQuery(Command.java:201)
at
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:110)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:1049)
... 25 more
Mar 31, 2017 5:02:21 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to fetch SQL query result [reqId=3, req=OdbcQueryFetchRequest
[queryId=0, pageSize=1024]]
javax.cache.CacheException: Failed to run map query remotely.
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:667)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$7.iterator(IgniteH2Indexing.java:1315)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:94)
at
org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.fetchQuery(OdbcRequestHandler.java:286)
at
org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.handle(OdbcRequestHandler.java:111)
at
org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(OdbcNioListener.java:124)
at
org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(OdbcNioListener.java:33)
at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:274)
at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:95)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.cache.CacheException: Failed to execute map query on the
node: 848e002f-8ae8-4c8a-bde6-a3a7ab4a9858, class
org.apache.ignite.IgniteCheckedException:Failed to execute SQL query.
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.fail(GridReduceQueryExecutor.java:283)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.onFail(GridReduceQueryExecutor.java:273)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.onMessage(GridReduceQueryExecutor.java:254)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.sendError(GridMapQueryExecutor.java:701)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:674)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:489)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:207)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:169)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:167)
at
org.apache.ignite.internal.util.lang.IgniteInClosure2X.apply(IgniteInClosure2X.java:38)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.send(IgniteH2Indexing.java:2130)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1194)
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:630)
... 14 more
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11608.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Indexing is disabled for cache
Posted by Igor Sapego <is...@gridgain.com>.
Can you attach a log from the node you were connected to?
Best Regards,
Igor
On Fri, Mar 31, 2017 at 1:36 PM, kavitha <ka...@gmail.com> wrote:
> Yes. I used correct query. Please see my below code.
>
> OdbcConnection con1 = new OdbcConnection("DSN=Apache Ignite DSN");
> con1.Open();
> OdbcCommand cmd1 = new OdbcCommand("select * from
> Categories", con1);
> OdbcDataReader dr1 = cmd1.ExecuteReader();
> DataTable table1 = new DataTable();
> table1.Load(dr1);
> con1.Close();
>
> If I use below query, I got exception from Load() method.
>
> OdbcCommand cmd1 = new OdbcCommand("SELECT\n __Z0.CATEGORYID AS
> __C0_0\nFROM NORTHWND.CATEGORIES __Z0\n /*
> NORTHWND.\"categoryname_asc_description_asc_idx\": CATEGORYNAME = ?1
> */\nWHERE __Z0.CATEGORYNAME = ?1", con1);
> OdbcDataReader dr1 = cmd1.ExecuteReader();
> DataTable table1 = new DataTable();
> table1.Load(dr1);
>
> Exception: Additional information: ERROR [HY000]
> javax.cache.CacheException:
> Failed to run map query remotely.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11605.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Indexing is disabled for cache
Posted by kavitha <ka...@gmail.com>.
Yes. I used correct query. Please see my below code.
OdbcConnection con1 = new OdbcConnection("DSN=Apache Ignite DSN");
con1.Open();
OdbcCommand cmd1 = new OdbcCommand("select * from
Categories", con1);
OdbcDataReader dr1 = cmd1.ExecuteReader();
DataTable table1 = new DataTable();
table1.Load(dr1);
con1.Close();
If I use below query, I got exception from Load() method.
OdbcCommand cmd1 = new OdbcCommand("SELECT\n __Z0.CATEGORYID AS
__C0_0\nFROM NORTHWND.CATEGORIES __Z0\n /*
NORTHWND.\"categoryname_asc_description_asc_idx\": CATEGORYNAME = ?1
*/\nWHERE __Z0.CATEGORYNAME = ?1", con1);
OdbcDataReader dr1 = cmd1.ExecuteReader();
DataTable table1 = new DataTable();
table1.Load(dr1);
Exception: Additional information: ERROR [HY000] javax.cache.CacheException:
Failed to run map query remotely.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11605.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Indexing is disabled for cache
Posted by Igor Sapego <is...@gridgain.com>.
Hi,
As I can see, your value type name (so is a table name) is "Categories".
So the right query in your case is:
select * from Categories
Best Regards,
Igor
On Fri, Mar 31, 2017 at 1:00 PM, kavitha <ka...@gmail.com> wrote:
> Hi Igor,
>
> Thanks for your response. I specified QueryEntity in my configuration file.
> But I got below error. Could you please help me how I resolve this?
>
> Additional information: ERROR [HY000] javax.cache.CacheException: class
> org.apache.ignite.IgniteException: Failed to parse query: select * from
> NORTHWND
>
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11600.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Indexing is disabled for cache
Posted by kavitha <ka...@gmail.com>.
Hi Igor,
Thanks for your response. I specified QueryEntity in my configuration file.
But I got below error. Could you please help me how I resolve this?
Additional information: ERROR [HY000] javax.cache.CacheException: class
org.apache.ignite.IgniteException: Failed to parse query: select * from
NORTHWND
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connect-to-SQL-DB-tp11180p11600.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Indexing is disabled for cache
Posted by Igor Sapego <is...@gridgain.com>.
Hi,
As I said before, you need to specify QueryEntity for your cache.
Go to the [1] and switch to the "Spring XML" tab for example.
[1] - https://apacheignite-net.readme.io/v1.9/docs/sql-
queries#section-configuring-sql-indexes-using-queryentity
Best Regards,
Igor
On Fri, Mar 31, 2017 at 9:25 AM, kavitha <ka...@gmail.com> wrote:
> Hi,
>
> I have successfully loaded cache. If I write query to get data, below
> exception occurred.
>
> ERROR [HY000] javax.cache.CacheException: Indexing is disabled for cache:
> NORTHWND. Use setIndexedTypes or setTypeMetadata methods on
> CacheConfiguration to enable.
>
> So I add indexedTypes property in SpringXML file. But failed to load
> SpringXML file. Could you please say me what's wrong in configuration file?
> I am not sure whether indexTypes property is correctly set or not.
>
> After adding indexTypes property, configuration is:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:util="http://www.springframework.org/schema/util"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://www.springframework.org/schema/util
> http://www.springframework.org/schema/util/spring-util.xsd">
> <bean id="ignite.cfg"
> class="org.apache.ignite.configuration.IgniteConfiguration">
>
> <property name="odbcConfiguration">
> <bean class="org.apache.ignite.configuration.OdbcConfiguration"/>
> </property>
>
> <property name="cacheConfiguration">
> <list>
> <bean class="org.apache.ignite.configuration.CacheConfiguration">
> <property name="cacheMode" value="PARTITIONED"/>
> <property name="atomicityMode" value="ATOMIC"/>
> <property name="name" value="NORTHWND"/>
> <property name="indexedTypes">
> <list>
> <value>java.lang.Integer</value>
> <value>LoadData.Categories</value>
> </list>
> </property>
> <property name="cacheStoreFactory">
> <bean
> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
> <property name="typeName"
> value="LoadData.CategoriesCacheFactory, LoadData"/>
> </bean>
> </property>
> </bean>
> </list>
> </property>
> </bean>
> </beans>
>
>
>
> --
> View this message in context: http://apache-ignite-users.705
> 18.x6.nabble.com/Connect-to-SQL-DB-tp11180p11597.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>