I am using JCS which I have used before in the same way without any problem.
When the server starts up I am setting the cache properties manually
CompositeCacheManager ccm = CompositeCacheManager.getUnconfiguredInstance();
Properties props = new Properties();
props.put("jcs.default", "");
props.put("jcs.default.cacheattributes", "org.apache.jcs.engine.CompositeCacheAttributes");
props.put("jcs.default.cacheattributes.MaxObjects", "1000");
props.put("jcs.default.cacheattributes.MemoryCacheName", "org.apache.jcs.engine.memory.lru.LRUMemoryCache");
props.put("jcs.default.cacheattributes.UseMemoryShrinker", "true");
props.put("jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds", "3600");
props.put("jcs.default.cacheattributes.ShrinkerIntervalSeconds", "60");
props.put("jcs.default.elementattributes", "org.apache.jcs.engine.ElementAttributes");
props.put("jcs.default.elementattributes.IsEternal", "false");
ccm.configure(props);
When setting this way an error is being thrown
org.apache.jcs.engine.CompositeCacheAttributes cannot be cast to org.apache.commons.jcs.engine.behavior.ICompositeCacheAttributes
I have used this exact same method on other projects without problem. Why am I getting this exception now?
EDIT
I am getting the JCS jar file from
<dependency>
<groupId>org.apache.jcs</groupId>
<artifactId>jcs</artifactId>
<version>1.3</version>
</dependency>
Prior to this I also tried to get the 2.0-beta version with the same problem
EDIT 2
I have opened a ticket in Jira, should anyone else be facing the same problem and wish to follow.