commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Köppel (JIRA) <j...@apache.org>
Subject [jira] [Created] (JCS-194) NullPointerException in IndexedDiskCache.addToRecycleBin(...)
Date Sun, 29 Jul 2018 13:03:00 GMT
Benedikt Köppel created JCS-194:
-----------------------------------

             Summary: NullPointerException in IndexedDiskCache.addToRecycleBin(...)
                 Key: JCS-194
                 URL: https://issues.apache.org/jira/browse/JCS-194
             Project: Commons JCS
          Issue Type: Bug
          Components: Indexed Disk Cache
    Affects Versions: jcs-2.2
            Reporter: Benedikt Köppel
         Attachments: jcsbug.tgz

*Note**:* this is not the same as https://issues.apache.org/jira/browse/JCS-158, which has
already been fixed in the jcs-2.2 version used here.

With the attached mini-project, we get a NullPointerException when the cache is loaded from
disk:
{code:java}
java.lang.NullPointerException
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache.addToRecycleBin(IndexedDiskCache.java:1145)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache$LRUMapSizeLimited.processRemovedLRU(IndexedDiskCache.java:1738)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache$LRUMapSizeLimited.processRemovedLRU(IndexedDiskCache.java:1637)
at org.apache.commons.jcs.utils.struct.AbstractLRUMap.put(AbstractLRUMap.java:344)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache$LRUMapSizeLimited.put(IndexedDiskCache.java:1685)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache$LRUMapSizeLimited.put(IndexedDiskCache.java:1637)
at org.apache.commons.jcs.utils.struct.AbstractLRUMap.putAll(AbstractLRUMap.java:187)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache.loadKeys(IndexedDiskCache.java:339)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache.initializeStoreFromPersistedData(IndexedDiskCache.java:285)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache.initializeKeysAndData(IndexedDiskCache.java:250)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache.<init>(IndexedDiskCache.java:183)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory.createCache(IndexedDiskCacheFactory.java:60)
at org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory.createCache(IndexedDiskCacheFactory.java:33)
at org.apache.commons.jcs.engine.control.CompositeCacheConfigurator.parseAuxiliary(CompositeCacheConfigurator.java:500)
at org.apache.commons.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:261)
at org.apache.commons.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:161)
at org.apache.commons.jcs.engine.control.CompositeCacheConfigurator.parseRegions(CompositeCacheConfigurator.java:136)
at org.apache.commons.jcs.engine.control.CompositeCacheManager.doConfigure(CompositeCacheManager.java:490)
at org.apache.commons.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:441)
at org.apache.commons.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:391)
at org.apache.commons.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:373)
at org.apache.commons.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:362)
at org.apache.commons.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCacheManager.java:190)
at org.apache.commons.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCacheManager.java:161)
at org.apache.commons.jcs.JCS.getCacheManager(JCS.java:172)
at org.apache.commons.jcs.JCS.getInstance(JCS.java:190)
at ch.locatee.test.App.main(App.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.lang.Thread.run(Thread.java:748)
{code}
 

This does not happen if (in my mini project), all the objects are the same size. It seems
like the _last_ element inserted into the cache has to be much bigger.

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message