You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by Rupesh Khandelwal <ru...@gmail.com> on 2006/06/19 13:38:16 UTC

Failed to init mem cache, using: LRUMemoryCache.... Help Needed

Hi All,

I am new to JCS. I am facing problems while configuring JCS. Please suggest
how to get rid of following error that I am getting on calling
JCS.getInstance method

WARNING: Failed to init mem cache, using: LRUMemoryCache
java.lang.ClassNotFoundException:
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:164)
 at org.apache.jcs.engine.control.CompositeCache.createMemoryCache(
CompositeCache.java:1176)
 at org.apache.jcs.engine.control.CompositeCache.<init>(CompositeCache.java
:138)
 at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(
CompositeCacheConfigurator.java:306)
 at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(
CompositeCacheConfigurator.java:264)
 at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegions(
CompositeCacheConfigurator.java:241)
 at org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure(
CompositeCacheConfigurator.java:136)
 at org.apache.jcs.engine.control.CompositeCacheManager.configure(
CompositeCacheManager.java:311)
 at org.apache.jcs.engine.control.CompositeCacheManager.configure(
CompositeCacheManager.java:255)
 at org.apache.jcs.engine.control.CompositeCacheManager.configure(
CompositeCacheManager.java:242)
 at org.apache.jcs.engine.control.CompositeCacheManager.configure(
CompositeCacheManager.java:191)
 at org.apache.jcs.engine.control.CompositeCacheManager.getInstance(
CompositeCacheManager.java:119)
 at org.apache.jcs.JCS.ensureCacheManager(JCS.java:99)
 at org.apache.jcs.JCS.getInstance(JCS.java:64)
 at com.yash.jcs.CacheManager.main(CacheManager.java:15)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Jun 19, 2006 4:34:25 PM
org.apache.jcs.engine.memory.lru.LRUMemoryCacheinitialize
INFO: initialized LRUMemoryCache for testCache1


Following are the contents of my cache.ccf file

# DEFAULT CACHE REGION
jcs.default=DC
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=false
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=21600
jcs.default.elementattributes.IdleTime=1800
jcs.default.elementattributes.IsSpool=true
jcs.default.elementattributes.IsRemote=true
jcs.default.elementattributes.IsLateral=true

# PRE-DEFINED CACHE REGIONS
jcs.region.testCache1=DC
jcs.region.testCache1.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.testCache1.cacheattributes.MaxObjects=1000
jcs.region.testCache1.cacheattributes.MemoryCacheName=
    org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.testCache1.cacheattributes.UseMemoryShrinker=false
jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
jcs.region.testCache1.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.region.testCache1.elementattributes.IsEternal=false

# AVAILABLE AUXILIARY CACHES
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=${user.dir}/jcs_swap
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000000
jcs.auxiliary.DC.attributes.MaxKeySize=1000000
jcs.auxiliary.DC.attributes.MaxRecycleBinSize=5000
jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
jcs.auxiliary.DC.attributes.ShutdownSpoolTimeLimit=60

Thanks,
Rupesh K

Re: Failed to init mem cache, using: LRUMemoryCache.... Help Needed

Posted by Sreelakshmi Dokkara <Sr...@lntinfotech.com>.
Welcome

______________________________________________________________________

Re: Failed to init mem cache, using: LRUMemoryCache.... Help Needed

Posted by Rupesh Khandelwal <ru...@gmail.com>.
Hi Sreelakshmi,

That solved the problem. In fact I corrected the config file once, but I
missed on one place. Thanks a lot for ur timely reply.

Issue Closed.
Rupesh K



On 6/19/06, Sreelakshmi Dokkara <Sr...@lntinfotech.com> wrote:
>
> This is the same mistake as mine.
> Correct ur config file.. it should not have any new lines after the "=".
>
> ______________________________________________________________________
>

Re: Failed to init mem cache, using: LRUMemoryCache.... Help Needed

Posted by Sreelakshmi Dokkara <Sr...@lntinfotech.com>.
This is the same mistake as mine.
Correct ur config file.. it should not have any new lines after the "=".

______________________________________________________________________