jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <asm...@yahoo.com>
Subject Re: ClassNotFoundException on value object when MemoryShrinker is enabled
Date Sat, 22 Apr 2006 15:48:42 GMT
It looks like your class files are not available to
the classloader that loaded JCS.  Put the jars in the
same directory and see if it helps.  Also, can you
send the full stack trace of the error if it is in the
logs.

Aaron

--- Eddie Liu <eidde.com@gmail.com> wrote:

> Yes, I am running under IBM Websphere application
> server.  Can you further
> explain what you mean by "same place as my code"? 
> Now the jcs jar is in a
> different directory and I have set up the
> dependencies (class-path in the
> MANIFEST.MF) so that my application can find the jar
> files.  I can move them
> to /WEB-INF/lib and see if that makes a difference,
> is that what you
> suggest?
> 
> Thank you for your help!
> 
> On 4/21/06, Smuts, Aaron
> <Aaron.Smuts@travelocity.com> wrote:
> >
> > 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:eidde.com@gmail.com]
> > > 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:
> jcs-users-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jcs-users-help@jakarta.apache.org
> >
> >
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message