Infinispan的预加载问题(不是AdvancedCacheLoader的实例)

时间:2016-06-09 13:58:05

标签: java jboss infinispan

我尝试使用SingleFileStore为infinispan启动缓存,并具有以下配置:

# Complete after ungrouping
X.tidy %>% 
    ungroup %>%
    complete(x, y, fill = list(count = 0))

# Complete within grouping
X.tidy %>% 
    complete(y, fill = list(count = 0))

但升级到更新版本的infinispan后,我开始收到以下错误:

Source: local data frame [4 x 3]

       x      y count
  <fctr> <fctr> <dbl>
1      A      i     1
2      A     ii     5
3      B      i    15
4      B     ii     0

在反编译org.infinispan.persistence.cluster.ClusterLoader之后,我看到它实现了Cache而不是AdvancedCache。我想有一个依赖或配置问题,但我无法弄清楚如何。

我的pom.xml包含以下内容:

 confBuilder.persistence().addSingleFileStore()
                    .location("Something").fetchPersistentState(Boolean.TRUE)
                    .preload(true).purgeOnStartup(false);

如果我将preload设置为false,我至少不会得到此错误。

-------- UPDATE ---------------

我应该提一下,我之前在流程中看到以下错误:

Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.persistence.manager.PersistenceManagerImpl.preload() on object of type PersistenceManagerImpl
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:171)
at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:869)
at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:638)
at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:627)
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:530)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:218)
at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:853)
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:599)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:554)
at org.infinispan.manager.DefaultCacheManager.access$100(DefaultCacheManager.java:116)
at org.infinispan.manager.DefaultCacheManager$1.run(DefaultCacheManager.java:453)

Caused by: org.infinispan.persistence.spi.PersistenceException: Cannot preload from cache loader 'org.infinispan.persistence.cluster.ClusterLoader' as it doesn't implement 'org.infinispan.persistence.spi.AdvancedCacheLoader'
at org.infinispan.persistence.manager.PersistenceManagerImpl.preload(PersistenceManagerImpl.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)
... 10 more

1 个答案:

答案 0 :(得分:1)

这可以连接到issues we have had in the past之一。您可以尝试迁移到最新的稳定版本(8.2.2)。