Looks like a classloader issue. Are you running inside of some evil application server that never did a nice thing for anyone? . . . Is the jcs jar in the same place as your code?
> -----Original Message----- > From: Eddie Liu [mailto:[EMAIL PROTECTED] > Sent: Friday, April 21, 2006 12:03 PM > To: jcs-users@jakarta.apache.org > Subject: ClassNotFoundException on value object when MemoryShrinker is > enabled > > Hi, > > I have set up a cache region using DC, with MemoryShrinker enabled (true). > I still receive the NoClassDefFoundError each time when restarting the web > server, that issue was discussed under a different threat. > > This time, with MemoryShrinker on, when the memory cache expired, I could > see the listDS.data file got populated and the file size went from 0k to > 1k. But after it wrote to the file in disk, i.e., after I saw in the log: > > ------------------------------------------------------ > ------------------------------------------------------ > [4/21/06 11:56:51:375 EDT] 0000003e CacheEventQue I Cache event queue > created: CacheEventQueue [listenerId=-1121403549, cacheName=listDS] > [4/21/06 11:57:01:391 EDT] 00000041 CacheEventQue I QProcessor exiting > for > CacheEventQueue [listenerId=-1121403549, cacheName=listDS] > ------------------------------------------------------ > ------------------------------------------------------ > > if I tried to access the cache again, I got the following exception: > > ------------------------------------------------------ > ------------------------------------------------------ > [4/21/06 11:58:52:406 EDT] 00000035 IndexedDisk E TRAS0014I: The > following exception was logged java.lang.ClassNotFoundException: > mypackage.BookVObj > at com.ibm.ws.classloader.CompoundClassLoader.findClass( > CompoundClassLoader.java(Compiled Code)) > at com.ibm.ws.classloader.CompoundClassLoader.loadClass( > CompoundClassLoader.java:414) > ------------------------------------------------------ > ------------------------------------------------------ > > where BookVObj is my value object for the cache. But again, in the > BookVObjManager, since it could not find the value object from cache, it > was > loaded from database and things seems to be working fine. > > So what do I need to do to get rid of that exception? > > The following is my cache.ccf setup for the region. > > ------------------------------------------------------ > ------------------------------------------------------ > jcs.region.listDS=DC > jcs.region.listDS.cacheattributes=org.apache.jcs.engine.CompositeCacheAt tr > ibutes > jcs.region.listDS.cacheattributes.MaxObjects=1200 > jcs.region.listDS.cacheattributes.MemoryCacheName=org.apache.jcs.engine. me > mory.lru.LRUMemoryCache > jcs.region.listDS.elementattributes.IsEternal=false > jcs.region.listDS.elementattributes.MaxLifeSeconds=10 > jcs.region.listDS.elementattributes.IdleTime=1800 > jcs.region.listDS.elementattributes.IsSpool=true > jcs.region.listDS.elementattributes.IsRemote=true > jcs.region.listDS.elementattributes.IsLateral=true > > jcs.region.listDS.cacheattributes.UseMemoryShrinker=true > jcs.region.listDS.cacheattributes.MaxMemoryIdleTimeSeconds=5 > jcs.region.listDS.cacheattributes.ShrinkerIntervalSeconds=5 > jcs.region.listDS.cacheattributes.MaxSpoolPerRun=500 > > ------------------------------------------------------ > ------------------------------------------------------ > > Thank you for all of you help!! > > Eddie --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]