Hi All, I am using EHCache 1.5.0 on a webapp running on WebLogic 9.1 instance and once in a while I run into the following error while getting an element from cache or while checking if an item exists in cache. Has anyone else seen this issue, any suggestions on how to fix this would be great
code that causes this issue
getMyCache().isKeyInCache(cacheKey)
--ehcache configuration -- maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true" diskPersistent="true"
I am using Spring to get an instance of CacheManager and here is my bean definition classpath:ehcache.xml
The error is as follows Stackoverflow:
java.lang.NullPointerException at net.sf.ehcache.Cache.isElementInMemory(Cache.java:1962) at net.sf.ehcache.Cache.isKeyInCache(Cache.java:2075) at com.test.services.impl.ContentServicesImpl.getContentItemFromCache(ContentServicesImpl.java:260) ......
There is nothing else in the log indicating the cause for the nullpointer on looking up a key in cache.
Any pointers, suggestions on how to fix this will be greatly appreciated. This does not happen consistently, seems to happen randomly in one environment. Thanks Srini