CompositeCacheManager.getUnconfiguredInstance() API usage

94 Views Asked by At

Below is my class looks like .

import org.apache.jcs.JCS;
import org.apache.jcs.access.exception.CacheException;
import org.apache.jcs.engine.control.CompositeCacheManager;

private JavaCacheUPKStore(Connection conn) {
    props.put("jcs.default", "");
    props.put("jcs.default.cacheattributes",
                "org.apache.jcs.engine.CompositeCacheAttributes");
    props.put("jcs.default.cacheattributes.MaxObjects",
                maxObjects.toString());
    props.put("jcs.default.cacheattributes.MemoryCacheName",
                "org.apache.jcs.engine.memory.lru.LRUMemoryCache");
    props.put("jcs.default.cacheattributes.UseMemoryShrinker", "false");
    CompositeCacheManager.getUnconfiguredInstance();

}

I've jcs-1.3.jar present in my project and getting below exception while executing project . Could not initialize class org.apache.jcs.engine.control.CompositeCacheManager

1

There are 1 best solutions below

0
On
Issue has been resolved after adding JTA dependency         
<dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>jta</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jcs</groupId>
            <artifactId>jcs</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>concurrent</groupId>
            <artifactId>concurrent</artifactId>
            <version>1.3.4</version>
        </dependency>