Thanks Niall for your help, The problem was resolved. My object witch a tried to manipulate with JCS was linked with a null ListObject.
Mohammed. Niall Gallagher wrote: > > 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: > [EMAIL PROTECTED] > web: > www.switchfire.com > > > -- View this message in context: http://www.nabble.com/JCS-can%E2%80%99t-read-an-element-witch-is-present-in-the-disk-cache.-tf4473090.html#a12759982 Sent from the JCS - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]