jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niall Gallagher <ni...@switchfire.com>
Subject Re: JCS can’t read an element witch is present in the disk cache.
Date Tue, 18 Sep 2007 10:01:41 GMT
Hi Mohammed,

I'm not an expert on JCS but this might be a problem with your hashCode
method in the ListObject class. Is it possible that one of the fields
your hashCode method uses to generate a hash code might be null?

Niall

On Tue, 2007-09-18 at 02:53 -0700, TMUser wrote:

> Hello,
> I have a little problem with JCS. In the loading of my application, I load
> thousands of objects from a database. If I use just LRUMemory, all my
> objects are loaded and can be read. But if I use LRU and IndexedDiskCache I
> have this error message :
> ----------------------------------------------------- 
> IndexedDiskCache.java:593  - Region [adosCache] Exception, Problem reading
> object from file 
> java.lang.NullPointerException 
>         at com.test.app.dto.ListObject.hashCode(ListObject.java:130) 
>         at java.util.HashMap.put(Unknown Source) 
>         at java.util.HashSet.readObject(Unknown Source) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
> … 
> ----------------------------------------------------- 
> IndexedDiskCache.java:551  - Region [adosCache] Failure getting from disk,
> key = [GAN: groupId=[groupId=adosCache, adosCache], attrName=AZ.BVG.1278] 
> java.io.IOException: Region [adosCache] Problem reading object from disk.
> null 
>         at
> org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.readElement(IndexedDiskCache.java:594)

>         at
> org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doGet(IndexedDiskCache.java:537)

> … 
> -----------------------------------------------------
> 
> When I see in the log, I found that the object witch I tried to read is in
> the cache. Here is a part of my log file:
> -----------------------------------------------------
> 2007-09-17 13:13:40,437 DEBUG [Analyser_0] - LRUMap.java:192  - getting item 
> for key [AWS: groupId=[groupId=adosCache, adosCache], attrName=aa.MM.12149]
> 2007-09-17 13:13:40,437 DEBUG [Analyser_0] - LRUMap.java:212  - LRUMap miss
> for [AWS: groupId=[groupId=adosCache, adosCache], attrName=aa.MM.12149]
> 2007-09-17 13:13:40,437 DEBUG [Analyser_0] - IndexedDiskCache.java:528  -
> Region [adosCache] Trying to get from disk: [AWS:
> groupId=[groupId=adosCache, adosCache], attrName=aa.MM.12149]
> 2007-09-17 13:13:40,593 DEBUG [Analyser_0] - LRUMap.java:192  - getting item 
> for key [AWS: groupId=[groupId=adosCache, adosCache], attrName=aa.MM.12149]
> 2007-09-17 13:13:40,593 DEBUG [Analyser_0] - LRUMap.java:202  - LRUMap hit
> for [AWS: groupId=[groupId=adosCache, adosCache], attrName=aa.MM.12149]
> 2007-09-17 13:13:40,593 DEBUG [Analyser_0] - IndexedDiskCache.java:580  -
> Region [adosCache] Found on disk, key: [AWS: groupId=[groupId=adosCache,
> adosCache], attrName=aa.MM.12149]
> 2007-09-17 13:13:40,906 ERROR [Analyser_0] - IndexedDiskCache.java:551  -
> Region [adosCache] Failure getting from disk, key = [AWS:
> groupId=[groupId=adosCache, adosCache], attrName=aa.MM.12149]
> -----------------------------------------------------
> 
> Please help if a have any idea for resolving this problem.
> 
> Thanks in advance. 
> Mohammed.
> 


____________________________________
Niall Gallagher
                
Technical Architect 
Switchfire Ltd. 
phone: 
              + 44 (0)20 7798 2807  
fax: 
              + 44 (0)20 7798 2801  
email: 
               niall@switchfire.com 
web: 
                 www.switchfire.com 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message