Error while reading file-store after eviction while using infinispan-cdi
ajcmartins Aug 31, 2012 12:47 PMHi, i am having troubles while trying to run a small test using infinispan-cdi version 5.1.5.FINAL on JBoss AS 7.1.1. I did tried to run the quickstart and everything works ok.
The error is:
17:28:05,963 ERROR [org.infinispan.loaders.file.FileCacheStore] (http--0.0.0.0-8080-1) ISPN000062: Error while reading from file: D:\jboss\standalone\data\learning\learning-cache\1450574848: java.lang.ClassNotFoundException: org.infinispan.cdi.interceptor.DefaultCacheKey from [Module "org.jboss.as.clustering.infinispan:main" from local module loader @43f46f3b (roots: D:\jboss\modules)]
On the maven POM file i have
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-cdi</artifactId>
<version>5.1.5.FINAL</version>
</dependency>
and
<manifestEntries>
<Dependencies>org.infinispan</Dependencies>
</manifestEntries>
on the jboss standalone-ha.xml i have:
<subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="learning">
<cache-container name="learning" default-cache="learning-cache">
<local-cache name="learning-cache" start="EAGER">
<eviction strategy="LRU" max-entries="2"/>
<file-store/>
</local-cache>
</cache-container>
</subsystem>
To setup the cache on java i have:
public class Config {
@Resource(lookup = "java:jboss/infinispan/container/learning")
@Produces
EmbeddedCacheManager defaultCacheManager;
}
The data being used is:
public class User implements Serializable{
private static final long serialVersionUID = -577278578670082130L;
private long id;
private String name = "abs";
...getters and setters...
}
and i am using interceptors on the service, like:
@CacheResult(cacheName = "learning-cache")
public User findUser(String id) {
User user = new User();
user.setName(id);
return user;
}
@CachePut(cacheName = "learning-cache")
public void storeUser(String id, @CacheValue User user) {
Log("Stored:" + user.getName());
}
I have to say that everything works great until i try to insert the 4rd element. That's when i get the error presented above.
When i open the cache file with a text editor i can see the org.infinispan.cdi.interceptor.DefaultCacheKey reference..
Any help or direction will be high apreciated.
Cheers,