I have a cache with many types in it. I am running pure Java nodes. I load the cache at start up before deploying services. The cache is backed by CacheJdbcPojoStore. I am using Ignite 1.8.
When I load with null predicate, everything works fine. All types and their instances are loaded in to memory. When I load with a predicate however, I get the following error. The curious thing is that on windows, the error does not occur and the predicate works fine. On Linux though, it fails. What could possibly be going wrong here?
The cache load code. ServiceStatus and ServiceMetric are just two of my pojo types backed by my database.
log.info("Local load cache started.");
cache.localLoadCache(new IgniteBiPredicate() {
@Override
public boolean apply(Object key, Object value) {
// include by default, exclude explicitly
// no service status before today
if (value instanceof ServiceStatus) {
if (((ServiceStatus)value).getLastUpdated().before(Timestamp.valueOf(LocalDate.now().atStartOfDay()))){
return false;
}
}
// no service metrics before today
if (value instanceof ServiceMetric) {
if (((ServiceMetric)value).getLastUpdated().before(Timestamp.valueOf(LocalDate.now().atStartOfDay()))){
return false;
}
}
return true;
}
}, null);
log.info("Local load cache finished.");
The error.
[ERROR] 2017-01-30 13:01:28.913 [main] ServiceGrid - Failed with exception. javax.cache.integration.CacheLoaderException: Failed to load cache: D9Cache at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:847) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:512) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:497) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:413) ~[ignite-core-1.8.0.jar:1.8.0] at com.nmf.model.persistence.CacheUtil.loadCache(CacheUtil.java:87) ~[shared-data-model-1.0-SNAPSHOT.jar:?] at com.nmf.grid.ServiceGrid.main(ServiceGrid.java:75) [dragon9-service-grid-1.0-SNAPSHOT.jar:?] Caused by: org.apache.ignite.binary.BinaryObjectException: Failed resolve class for ID: 292145121 at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:696) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1491) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1450) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:637) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:142) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.loadEntry(GridDhtCacheAdapter.java:528) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.access$300(GridDhtCacheAdapter.java:94) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$4.apply(GridDhtCacheAdapter.java:501) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$4.apply(GridDhtCacheAdapter.java:497) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter$3.apply(GridCacheStoreManagerAdapter.java:528) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$1.call(CacheAbstractJdbcStore.java:462) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$1.call(CacheAbstractJdbcStore.java:429) ~[ignite-core-1.8.0.jar:1.8.0] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_111] at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_111] Caused by: org.apache.ignite.IgniteCheckedException: Class definition was not found at marshaller cache and local file. [id=292145121, file=/tmp/ignite/work/marshaller/292145121.classname] at org.apache.ignite.internal.MarshallerContextImpl.className(MarshallerContextImpl.java:218) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.MarshallerContextAdapter.getClass(MarshallerContextAdapter.java:174) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:680) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1491) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1450) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:637) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:142) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.loadEntry(GridDhtCacheAdapter.java:528) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.access$300(GridDhtCacheAdapter.java:94) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$4.apply(GridDhtCacheAdapter.java:501) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$4.apply(GridDhtCacheAdapter.java:497) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter$3.apply(GridCacheStoreManagerAdapter.java:528) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$1.call(CacheAbstractJdbcStore.java:462) ~[ignite-core-1.8.0.jar:1.8.0] at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$1.call(CacheAbstractJdbcStore.java:429) ~[ignite-core-1.8.0.jar:1.8.0] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_111] at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_111]