jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Ortiz <cor...@coral-technologies.com>
Subject Re: Java.lang.NullPointerException in JCS.getInstance();
Date Tue, 27 Feb 2007 21:36:51 GMT
Same problem with

# DEFAULT CACHE REGION

# sets the default aux value for any non configured caches
jcs.default=DC,RFailover
jcs.default.cacheattributes=
    org.apache.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
jcs.default.cacheattributes.MemoryCacheName=
    org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=3600
jcs.default.elementattributes.IdleTime=1800
jcs.default.elementattributes.IsSpool=true
jcs.default.elementattributes.IsRemote=true
jcs.default.elementattributes.IsLateral=true

added to my cff

Smuts, Aaron wrote:
> You need the default settings.  The first section of your ccf is wrong. 
>
>   
>> -----Original Message-----
>> From: Carlos Ortiz [mailto:cortiz@coral-technologies.com]
>> 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: 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message