Using Cache Store with Clustered Distributed Cache
sonalm13 Dec 3, 2013 5:11 AMHi, I am quite new to Infinispan. I am trying to persist data using cache store. I started 3 nodes in the clustered environment using distributed cache. After starting these nodes, i wrote some data to them which was distributed among these. This is configuration for cache used:
<distributed-cache name="test-disc-cache" owners="2" mode="SYNC" remote-timeout="30000" start="EAGER" l1-lifespan="0">
<locking isolation="READ_COMMITTED" striping="false" acquire-timeout="30000" concurrency-level="1000"/>
<transaction mode="NONE"/>
<file-store passivation="false" purge="true" preload="false" shared="true"/>
<eviction max-entries="2000" strategy = "NONE"/>
</distributed-cache>
Since i am trying to use cache store with cache, i killed two cluster nodes, and restarted one of them but got this error:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.infinispan.clustered.test-disc-cache: org.jboss.msc.service.StartException in service jboss.infinispan.clustered.test-disc-cache: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.persistence.manager.PersistenceManagerImpl.start() on object of type PersistenceManagerImpl
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:185)
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:216)
at org.infinispan.CacheImpl.start(CacheImpl.java:666)
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:551)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:514)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:396)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:410)
at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:89)
at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:80)
at org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:78)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
... 3 more
Caused by: org.infinispan.commons.CacheException: Unable to start cache loaders
at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_40]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_40]
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:183)
... 18 more
Caused by: org.infinispan.persistence.spi.PersistenceException: java.io.IOException: Unsupported protocol version 57
at org.infinispan.persistence.file.SingleFileStore.start(SingleFileStore.java:123)
at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:122)
... 23 more
Caused by: java.io.IOException: Unsupported protocol version 57
at org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1243)
at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.startObjectInput(AbstractJBossMarshaller.java:134)
at org.infinispan.marshall.core.VersionAwareMarshaller.startObjectInput(VersionAwareMarshaller.java:142)
at org.infinispan.marshall.core.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:98)
at org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:80)
at org.infinispan.persistence.file.SingleFileStore.rebuildIndex(SingleFileStore.java:199)
at org.infinispan.persistence.file.SingleFileStore.start(SingleFileStore.java:119)
... 24 more
If i clear the data from disc, i am able to start this node w/o error. But what i what here is that the data should be loaded from cache store...if node/server is restarted. Any help will be appreciated.
Also, if some one could help me with the configuration that i want will be very helpful:
1. Clustered Nodes with disrtibuted cache
2. Cache store to persist data
Thanks in advance.
Sonal