You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Kirys <ki...@neoteroi.org> on 2016/11/26 15:07:02 UTC
JCS 2.0-beta-2: ShrinkerThread: Unexpected trouble in shrink cycle
Hi all
I'm am experimenting with JCS 2.0-beta-2 inside a TomEE 1.6.4
application (I'm using it directly not using jcache)
I'm am periodically finding this error into the logs:
[C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|DEBUG
o.a.c.j.e.m.s.ShrinkerThread: Shrinking memory cache for: short
[C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|DEBUG
o.a.c.j.e.m.s.ShrinkerThread: Keys size: 1
[C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|DEBUG
o.a.c.j.e.m.AbstractMemoryCache: short: MemoryCache quiet hit for
lastFetchDate
[C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|DEBUG
o.a.c.j.e.c.CompositeCache: Exceeded maxLife: lastFetchDate
[C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|DEBUG
o.a.c.j.e.m.AbstractDoubleLinkedListMemoryCache: removing item for key:
lastFetchDate
[C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|INFO
o.a.c.j.e.m.s.ShrinkerThread: Unexpected trouble in shrink cycle
java.lang.NoClassDefFoundError:
org/apache/commons/jcs/engine/control/group/GroupAttrName
at
org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache.remove(AbstractDoubleLinkedListMemoryCache.java:427)
at
org.apache.commons.jcs.engine.memory.shrinking.ShrinkerThread.shrink(ShrinkerThread.java:157)
at
org.apache.commons.jcs.engine.memory.shrinking.ShrinkerThread.run(ShrinkerThread.java:91)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
What can it be?
Current configuration is:
# cache configuration
jcs.default=
jcs.default.cacheattributes=
org.apache.commons.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=10
jcs.default.cacheattributes.MemoryCacheName=
org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.short=
jcs.region.short.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
jcs.region.short.cacheattributes.MaxObjects=200
jcs.region.short.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.short.cacheattributes.UseMemoryShrinker=true
jcs.region.short.cacheattributes.MaxMemoryIdleTimeSeconds=60
jcs.region.short.cacheattributes.ShrinkerIntervalSeconds=30
jcs.region.short.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
jcs.region.short.elementattributes.IsEternal=false
jcs.region.short.elementattributes.MaxLife=800
jcs.region.long=
jcs.region.long.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
jcs.region.long.cacheattributes.MaxObjects=30
jcs.region.long.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.long.cacheattributes.UseMemoryShrinker=true
jcs.region.long.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.long.cacheattributes.ShrinkerIntervalSeconds=30
jcs.region.long.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
jcs.region.long.elementattributes.IsEternal=false
jcs.region.long.elementattributes.MaxLife=1800
into the pom I've put this dependency
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs-core</artifactId>
<version>2.0-beta-2</version>
</dependency>
Thank you
Bye
K.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: JCS 2.0-beta-2: ShrinkerThread: Unexpected trouble in shrink
cycle
Posted by Kirys <ki...@neoteroi.org>.
On 26/11/2016 20:09, Thomas Vandahl wrote:
> On 26.11.16 16:07, Kirys wrote:
>> [C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|INFO
>> o.a.c.j.e.m.s.ShrinkerThread: Unexpected trouble in shrink cycle
>> java.lang.NoClassDefFoundError:
>> org/apache/commons/jcs/engine/control/group/GroupAttrName
> This looks like a class-loader issue between threads. The class
> mentioned is included in the commons-jcs-core jar and the application
> should have no problems loading it. I'm not familiar with the TomEE
> environment. Can you try to reproduce the problem outside this context?
I have to admit that currently I was not able to reproduce in a client app.
Next week I'll try to put JCS war into the lib folder of tomee to see if
this fix the issue.
Bye
K.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: JCS 2.0-beta-2: ShrinkerThread: Unexpected trouble in shrink
cycle
Posted by Thomas Vandahl <tv...@apache.org>.
On 26.11.16 16:07, Kirys wrote:
> [C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|INFO
> o.a.c.j.e.m.s.ShrinkerThread: Unexpected trouble in shrink cycle
> java.lang.NoClassDefFoundError:
> org/apache/commons/jcs/engine/control/group/GroupAttrName
This looks like a class-loader issue between threads. The class
mentioned is included in the commons-jcs-core jar and the application
should have no problems loading it. I'm not familiar with the TomEE
environment. Can you try to reproduce the problem outside this context?
Bye, Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org