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 paulo caroli <pc...@corp.blah.com> on 2003/10/30 19:29:32 UTC
hello bookCache
Hi all,
I am new to jcs and I am trying to run the BookCache sample available in the
web site (http://jakarta.apache.org/turbine/jcs/UsingJCSBasicWeb.html)
I changed the cache.ccf to make it work as a local cache (please find
cache.ccf below).
I added the toString method to BookVObjManager class
public class BookVObjManager
{ .
public String toString()
{
return bookCache.toString();
}
.
I created a TestBookCache for istantiating the BookVObjManager and try using
the cache.
public class TestBookCache {
public static void main(String[] args) {
System.out.println("TestBookCache.");
System.out.println();
try
{
BookVObjManager cache = BookVObjManager.getInstance();
System.out.println("BookVObjManager.getInstance()");
System.out.println("cache.toString()");
System.out.println(cache.toString());
BookVObj book1 = cache.getBookVObj(1);
System.out.println("cache.toString()");
System.out.println(cache.toString());
}
catch (Exception exc)
{
exc.printStackTrace();
}
}
}
When executing I get the following error:
TestBookCache.
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.jcs.access.CacheAccess.<clinit>(CacheAccess.java:90)
at BookVObjManager.<init>(BookVObjManager.java:17)
at BookVObjManager.getInstance(BookVObjManager.java:36)
at TestBookCache.main(TestBookCache.java:11)
Exception in thread "main"
Any hints?
Thanks in advance,
Paulo
Cache.ccf
------------------------------------------------------------
# DEFAULT CACHE REGION
jcs.default=DC
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=2000
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru
.LRUMemoryCache
jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=2400
jcs.default.elementattributes.IdleTime=1800
jcs.default.elementattributes.IsSpool=false
jcs.default.elementattributes.IsRemote=false
jcs.default.elementattributes.IsLateral=false
#Region
jcs.region.bookCache =DC
jcs.region.bookCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt
ributes
jcs.region.bookCache.cacheattributes.MaxObjects=4000
jcs.region.bookCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m
emory.lru.LRUMemoryCache
jcs.region.bookCache.cacheattributes.UseMemoryShrinker=true
jcs.region.bookCache.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.bookCache.cacheattributes.ShrinkerIntervalSeconds=600
jcs.region.bookCache.elementattributes=org.apache.jcs.engine.ElementAttribut
es
jcs.region.bookCache.elementattributes.IsEternal=false
jcs.region.bookCache.elementattributes.MaxLifeSeconds=2400
jcs.region.bookCache.elementattributes.IdleTime=180
jcs.region.bookCache.elementattributes.IsSpool=false
jcs.region.bookCache.elementattributes.IsRemote=false
jcs.region.bookCache.elementattributes.IsLateral=false
end of Cache.ccf
jcs.jar and all dependenciesl jar files
Posted by paulo caroli <pc...@corp.blah.com>.
Hey all,
You can find all jar files needed for jcs in the following url:
http://mirrors.sunsite.dk/maven/
This url helped me out when looking for the jcs.jar file and all its
dependencies as listed at:
http://jakarta.apache.org/turbine/jcs/dependencies.html
I hope it help some other developers.
Paulo Caroli
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org
Re: hello bookCache
Posted by Daniel Rosenbaum <dr...@yahoo.com>.
Paulo,
Do you have the jar file from the apache commons logging
project?
Daniel
--- paulo caroli <pc...@corp.blah.com> wrote:
> Hi all,
>
>
>
> I am new to jcs and I am trying to run the BookCache sample
> available in the
> web site
> (http://jakarta.apache.org/turbine/jcs/UsingJCSBasicWeb.html)
>
> I changed the cache.ccf to make it work as a local cache
> (please find
> cache.ccf below).
>
>
>
> I added the toString method to BookVObjManager class
>
>
>
> public class BookVObjManager
>
> { .
>
> public String toString()
>
> {
>
> return bookCache.toString();
>
> }
>
> .
>
>
>
> I created a TestBookCache for istantiating the BookVObjManager
> and try using
> the cache.
>
>
>
> public class TestBookCache {
>
>
>
> public static void main(String[] args) {
>
> System.out.println("TestBookCache.");
>
> System.out.println();
>
> try
>
> {
>
> BookVObjManager cache = BookVObjManager.getInstance();
>
> System.out.println("BookVObjManager.getInstance()");
>
>
>
> System.out.println("cache.toString()");
>
> System.out.println(cache.toString());
>
>
>
> BookVObj book1 = cache.getBookVObj(1);
>
>
>
> System.out.println("cache.toString()");
>
> System.out.println(cache.toString());
>
> }
>
> catch (Exception exc)
>
> {
>
> exc.printStackTrace();
>
> }
>
>
>
> }
>
>
>
> }
>
>
>
>
>
> When executing I get the following error:
>
> TestBookCache.
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
>
> at
>
org.apache.jcs.access.CacheAccess.<clinit>(CacheAccess.java:90)
>
> at BookVObjManager.<init>(BookVObjManager.java:17)
>
> at
> BookVObjManager.getInstance(BookVObjManager.java:36)
>
> at TestBookCache.main(TestBookCache.java:11)
>
> Exception in thread "main"
>
>
>
>
>
> Any hints?
>
>
>
> Thanks in advance,
>
> Paulo
>
>
>
>
>
> Cache.ccf
>
> ------------------------------------------------------------
>
> # DEFAULT CACHE REGION
>
> jcs.default=DC
>
>
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
>
> jcs.default.cacheattributes.MaxObjects=2000
>
>
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru
> .LRUMemoryCache
>
>
jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
>
> jcs.default.elementattributes.IsEternal=false
>
> jcs.default.elementattributes.MaxLifeSeconds=2400
>
> jcs.default.elementattributes.IdleTime=1800
>
> jcs.default.elementattributes.IsSpool=false
>
> jcs.default.elementattributes.IsRemote=false
>
> jcs.default.elementattributes.IsLateral=false
>
>
>
>
>
> #Region
>
> jcs.region.bookCache =DC
>
>
jcs.region.bookCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt
> ributes
>
> jcs.region.bookCache.cacheattributes.MaxObjects=4000
>
>
jcs.region.bookCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m
> emory.lru.LRUMemoryCache
>
> jcs.region.bookCache.cacheattributes.UseMemoryShrinker=true
>
>
jcs.region.bookCache.cacheattributes.MaxMemoryIdleTimeSeconds=3600
>
>
jcs.region.bookCache.cacheattributes.ShrinkerIntervalSeconds=600
>
>
jcs.region.bookCache.elementattributes=org.apache.jcs.engine.ElementAttribut
> es
>
> jcs.region.bookCache.elementattributes.IsEternal=false
>
> jcs.region.bookCache.elementattributes.MaxLifeSeconds=2400
>
> jcs.region.bookCache.elementattributes.IdleTime=180
>
> jcs.region.bookCache.elementattributes.IsSpool=false
>
> jcs.region.bookCache.elementattributes.IsRemote=false
>
> jcs.region.bookCache.elementattributes.IsLateral=false
>
> end of Cache.ccf
>
>
>
>
>
>
>
>
>
>
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org