Ehcache throws NullPointerException while evicting expired elements

274 Views Asked by At

In Ehcache, to remove old entries I have enabled timeToIdleSecondsproperty.

Periodically, one process tries to remove all the expired elements from cache by calling cache.evictExpiredElements()

Cache Configuration:

 <cache name="cache" maxEntriesLocalHeap="100000" eternal="false" overflowToDisk="true" diskPersistent="true" timeToIdleSeconds="60"/>

The following exception thrown during eviction (not always):

EhCache: run(): catching java.lang.NullPointerException at net.sf.ehcache.store.offheap.disk.OffHeapDiskStore.expireElements(OffHeapDiskStore.java:348) ~[ehcache-ee-2.9.0.jar:2.9.0] at net.sf.ehcache.store.CacheStore.expireElements(CacheStore.java:426) ~[ehcache-ee-2.9.0.jar:2.9.0] at net.sf.ehcache.Cache.evictExpiredElements(Cache.java:2986) ~[ehcache-ee-2.9.0.jar:2.9.0]

Am I missing something here?

0

There are 0 best solutions below