Thank You for  reply

What are the classes for Date that you are using and what API are you using 
to execute queries? Also please post stacktrace that you observe. 

What are the classes for Date?
using java.util

Model Class
-----------
Class Employee 
{ 

    String name; 
    String address; 
          
    @QuerySqlField(index = true) 
    Date joinDate; 
} 

cache Configuration:
====================

                Ignite ignite = Ignition.ignite();
                CacheConfiguration<String, Employee> cacheCfg = new
CacheConfiguration<>(cacheName);
                cacheCfg.setCacheMode(CacheMode.REPLICATED); // Default.
                
                cacheCfg.setIndexedTypes(String.class, Employee.class);
                cacheCfg.setAtomicityMode(atomic);
                // client node will wait for write or commit on all 
particpating nodes
        
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);

                 IgniteCache<String,Employee> cache =  
ignite.getOrCreateCache(cacheCfg);
                 cache.put(key.trim(), employee); //getting Exception here
                 



Exception while putting into cache

javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException:
Failed to serialize object [typeName=com.cva.model.Employee]


what API are you using  to execute queries?

using SqlFieldsQuery api 

query will be dynamic
it will be like select * from Employee,select * from Employee where name =
'cva',select * from Employee where joinDate = 10/6/2015 and 10/6/2016,
SqlFieldsQuery sql = new SqlFieldsQuery(query);
QueryCursor<List&lt;?>> cursor = cache.query(sql);




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to