jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie Liu" <eidde....@gmail.com>
Subject ClassNotFoundException on value object when MemoryShrinker is enabled
Date Fri, 21 Apr 2006 16:02:47 GMT
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.CompositeCacheAttributes
jcs.region.listDS.cacheattributes.MaxObjects=1200
jcs.region.listDS.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message