You need the default settings. The first section of your ccf is wrong.
-----Original Message-----
From: Carlos Ortiz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 27, 2007 12:33 PM
To: jcs-users@jakarta.apache.org
Subject: Java.lang.NullPointerException in JCS.getInstance();
Hi i'm trying JCS for a web page I'm having a problem when i try to
intance a JCS class:
Java.lang.NullPointerException
at
org.apache.jcs.config.OptionConverter.findAndSubst(OptionConverter.java:
28
9)
at
org.apache.jcs.config.OptionConverter.instantiateByKey(OptionConverter.j
av
a:167)
at
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseElementAtt
ri
butes(CompositeCacheConfigurator.java:438)
at
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com
po
siteCacheConfigurator.java:304)
at
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com
po
siteCacheConfigurator.java:280)
at
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCa
ch
eManager.java:445)
at
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCa
ch
eManager.java:384)
at
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCa
ch
eManager.java:371)
at org.apache.jcs.JCS.getInstance(JCS.java:66)........
This is my cache.ccf
# CACHE REGIONS AVAILABLE
jcs.InformtationCache=
jcs.InformtationCache.cacheattributes=org.apache.jcs.engine.CompositeCac
he
Attributes
jcs.InformtationCache.cacheattributes.MaxObjects=1000
jcs.InformtationCache.cacheattributes.MemoryCacheName=org.apache.jcs.eng
in
e.memory.lru.LRUMemoryCache
# Regions preconfigured for caching
jcs.regionInformtationCache=DC,RFailover
jcs.region.InformtationCache.cacheattributes=
org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.InformtationCache.cacheattributes.MaxObjects=1200
jcs.region.InformtationCache.cacheattributes.MemoryCacheName=
org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.InformtationCache.elementattributes.IsEternal=false
jcs.region.InformtationCache.elementattributes.MaxLifeSeconds=7200
jcs.region.InformtationCache.elementattributes.IdleTime=1800
jcs.region.InformtationCache.elementattributes.IsSpool=true
jcs.region.InformtationCache.elementattributes.IsRemote=true
jcs.region.InformtationCache.elementattributes.IsLateral=true
# AUXILIARY CACHES AVAILABLE
# Primary Disk Cache -- faster than the rest because of memory key
storage
jcs.auxiliary.DC=
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=d:\temp
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC.attributes.MaxKeySize=10000
jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
jcs.auxiliary.DC.attributes.MaxRecycleBinSize=7500
=DC,RFailover
jcs.region.InformtationCache.cacheattributes=
org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.InformtationCache.cacheattributes.MaxObjects=1200
jcs.region.InformtationCache.cacheattributes.MemoryCacheName=
org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.InformtationCache.elementattributes.IsEternal=false
jcs.region.InformtationCache.elementattributes.MaxLifeSeconds=7200
jcs.region.InformtationCache.elementattributes.IdleTime=1800
jcs.region.InformtationCache.elementattributes.IsSpool=true
jcs.region.InformtationCache.elementattributes.IsRemote=true
jcs.region.InformtationCache.elementattributes.IsLateral=true
Also here is the code:
private static JCS IntiCache() {
if (InformtationCache == null)
try {
InformtationCache =
JCS.getInstance("InformtationCache");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return InformtationCache;
}
for the record I'm using tomcat 5.5.X with SUN JDK 5 update 11 in
windows.
thax for the help ;)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]