I am trying to load data to cache using below code and seeing an error.

            ignite.cache("CustomerCache").loadCache(new IgniteBiPredicate()
{
                @Override
                                public boolean apply(Object key, Object value) {
                                if(((Customer) value).getId()==1000000001);
                                        return true;
                                }
            });

ERROR:-

Caused by: java.lang.ClassCastException:
org.apache.ignite.internal.binary.BinaryObjectImpl cannot be cast to
com.idb.cache.model.Customer
        at
com.idb.cache.load.LoadIdbIgniteCaches$1.apply(LoadIdbIgniteCaches.java:36)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.loadEntry(GridDhtCacheAdapter.java:639)



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

Reply via email to