ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Isaeed Mohanna <isae...@gmail.com>
Subject SQLCacheQuery Problem
Date Wed, 17 Jun 2015 14:22:45 GMT
Hi
*I am using Ignite 1.0.0, I have a cache defined with the following
configuration (defined at startup):*
CacheConfiguration<?, ?> CacheConfig = new CacheConfiguration<>();
CacheConfig .setName("myCache");
CacheConfig .setCacheMode(CacheMode.REPLICATED);
CacheConfig .setAtomicityMode(CacheAtomicityMode.ATOMIC);
CacheConfig .setIndexedTypes(UUID.class, MyClass.class);
*The class MyClass looks as follows:*
public class MyClass implements Externalizable {
	@QuerySqlField(index = true)
	private UUID id;
	private UUID anotherId;
	@QuerySqlField(index = true)
	private Date time;
  .. setters/ getters and some other fields
}
*I am trying to perform sql query on my cache using the following:*
IgniteCache<UUID, MyClass> reportsSchedule = ignite.cache("myCache");
SqlQuery<UUID, MyClass> sqlQuery = new SqlQuery<UUID,
MyClass>(MyClass.class, "time <= ?");
QueryCursor<Entry&lt;UUID, MyClass>> cursor =
myCache.query(sqlQuery.setArgs(new Date()));

*However I keep getting the following exception:*
Caused by: class org.apache.ignite.IgniteException: Failed to find SQL table
for type: MyClass
	at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1699)
	at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:478)
	at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6069)
	at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:472)

*MyClass and UUID are defined in the configuration as an indexed type, also
annotated as so in MyClass definition however i still receive this
exception. Any idea what am i missing?*



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SQLCacheQuery-Problem-tp511.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message