• Bug
  • Status: New
  • 2 Major
  • Resolution:
  • ehcache-terracotta
  • drb
  • Reporter: pkjacobp
  • December 02, 2016
  • 0
  • Watchers: 1
  • December 02, 2016

Description

We are getting NullPointerException intermittently when the application is under heavy load. Please see the stack traces and cache configuration below

{panel:title=Stack Trace 1} build 30-Nov-2016 03:38:18 java.lang.NullPointerException build 30-Nov-2016 03:38:18 at org.terracotta.statistics.util.VicariousThreadLocal.get(VicariousThreadLocal.java:103) build 30-Nov-2016 03:38:18 at org.terracotta.statistics.jsr166e.LongAdder.add(LongAdder.java:64) build 30-Nov-2016 03:38:18 at org.terracotta.statistics.jsr166e.LongAdder.increment(LongAdder.java:76) build 30-Nov-2016 03:38:18 at org.terracotta.statistics.GeneralOperationStatistic.end(GeneralOperationStatistic.java:71) build 30-Nov-2016 03:38:18 at net.sf.ehcache.store.MemoryStore.get(MemoryStore.java:331) build 30-Nov-2016 03:38:18 at net.sf.ehcache.Cache.get(Cache.java:1697) build 30-Nov-2016 03:38:18 at org.hibernate.cache.ehcache.internal.regions.EhcacheGeneralDataRegion.get(EhcacheGeneralDataRegion.java:74) build 30-Nov-2016 03:38:18 at org.hibernate.cache.ehcache.internal.regions.EhcacheQueryResultsRegion.get(EhcacheQueryResultsRegion.java:39) build 30-Nov-2016 03:38:18 at org.hibernate.cache.internal.StandardQueryCache.get(StandardQueryCache.java:130) build 30-Nov-2016 03:38:18 at org.hibernate.loader.Loader.getResultFromQueryCache(Loader.java:2309) build 30-Nov-2016 03:38:18 at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2217) build 30-Nov-2016 03:38:18 at org.hibernate.loader.Loader.list(Loader.java:2190) build 30-Nov-2016 03:38:18 at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:122) build 30-Nov-2016 03:38:18 at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1622) build 30-Nov-2016 03:38:18 at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374) {panel}

{panel:title=Stack Trace 2} java.lang.NullPointerException at org.terracotta.statistics.util.VicariousThreadLocal.get(VicariousThreadLocal.java:103) at org.terracotta.statistics.jsr166e.LongAdder.add(LongAdder.java:64) at org.terracotta.statistics.jsr166e.LongAdder.increment(LongAdder.java:76) at org.terracotta.statistics.GeneralOperationStatistic.end(GeneralOperationStatistic.java:71) at net.sf.ehcache.store.MemoryStore.get(MemoryStore.java:328) at net.sf.ehcache.Cache.get(Cache.java:1697) at org.hibernate.cache.ehcache.internal.regions.EhcacheTransactionalDataRegion.get(EhcacheTransactionalDataRegion.java:115) at org.hibernate.cache.ehcache.internal.strategy.NonStrictReadWriteEhcacheEntityRegionAccessStrategy.get(NonStrictReadWriteEhcacheEntityRegionAccessStrategy.java:61) at org.hibernate.cache.ehcache.internal.nonstop.NonstopAwareEntityRegionAccessStrategy.get(NonstopAwareEntityRegionAccessStrategy.java:133) at org.hibernate.event.internal.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:546) at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:419) at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:204) at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:260) at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:148) at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1079) at org.hibernate.internal.SessionImpl.internalLoad(SessionImpl.java:1006) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:613) at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:247) at org.hibernate.cache.internal.StandardQueryCache.get(StandardQueryCache.java:158) at org.hibernate.loader.Loader.getResultFromQueryCache(Loader.java:2309) at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2217) at org.hibernate.loader.Loader.list(Loader.java:2190) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:122) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1622) at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)

{panel}

Cache configuration:

<ehcache updateCheck="false" maxBytesLocalHeap="500M">
	<diskStore path="java.io.tmpdir"/>
	<defaultCache
			eternal="false"
			timeToIdleSeconds="120"
			timeToLiveSeconds="120"
			memoryStoreEvictionPolicy="LRU">
		<persistence strategy="none"/>
	</defaultCache>
	<cache name="DefaultCacheRegion"
		   timeToIdleSeconds="120"
		   timeToLiveSeconds="120"
		   maxBytesLocalHeap="20%"
		   memoryStoreEvictionPolicy="LRU">
		<persistence strategy="none"/>
	</cache>
        <!-- other cache regions -->
</ehcache>

Comments