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 <[email protected]> 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. >
