java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When plugin code creates a cache in a clustered environment with replicateAsynchronously() setting, a NPE is thrown. Strangely through, the second call succeeds and the cache can be used. The code: {code} CacheSettings settings = new CacheSettingsBuilder().replicateAsynchronously().build(); cacheManager.getCache(cacheID, new MyLoader(), settings); {code} If {{replicateAsynchronously()}} is removed, everything works on the first time too. The exception: {code} Exception in thread "ItemTrackerMonitor" java.lang.NullPointerException at org.terracotta.context.extractor.ObjectContextExtractor.extractInstanceAttribute(ObjectContextExtractor.java:57) at org.terracotta.context.extractor.ObjectContextExtractor.extract(ObjectContextExtractor.java:50) at org.terracotta.context.ContextManager.getOrCreateTreeNode(ContextManager.java:129) at org.terracotta.context.ContextManager.associate(ContextManager.java:114) at org.terracotta.context.ContextManager.access$000(ContextManager.java:39) at org.terracotta.context.ContextManager$1.withParent(ContextManager.java:64) at net.sf.ehcache.constructs.EhcacheDecoratorAdapter.<init>(EhcacheDecoratorAdapter.java:68) at net.sf.ehcache.constructs.blocking.BlockingCache.<init>(BlockingCache.java:93) at net.sf.ehcache.constructs.blocking.BlockingCache.<init>(BlockingCache.java:106) at net.sf.ehcache.constructs.blocking.SelfPopulatingCache.<init>(SelfPopulatingCache.java:58) at com.atlassian.cache.ehcache.EhCacheManager$3.get(EhCacheManager.java:142) at com.atlassian.cache.ehcache.EhCacheManager$3.get(EhCacheManager.java:136) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:303) at com.atlassian.cache.ehcache.EhCacheManager.createComputingCache(EhCacheManager.java:135) at com.atlassian.cache.impl.AbstractCacheManager.getCache(AbstractCacheManager.java:179) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy188.getCache(Unknown Source) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy188.getCache(Unknown Source) at com.almworks.jira.structure.services2g.itemtracker.AOBasedItemTracker$ProductionEnv.getCache(AOBasedItemTracker.java:746) {code}
    via by Igor Sereda,
  • When plugin code creates a cache in a clustered environment with replicateAsynchronously() setting, a NPE is thrown. Strangely through, the second call succeeds and the cache can be used. The code: {code} CacheSettings settings = new CacheSettingsBuilder().replicateAsynchronously().build(); cacheManager.getCache(cacheID, new MyLoader(), settings); {code} If {{replicateAsynchronously()}} is removed, everything works on the first time too. The exception: {code} Exception in thread "ItemTrackerMonitor" java.lang.NullPointerException at org.terracotta.context.extractor.ObjectContextExtractor.extractInstanceAttribute(ObjectContextExtractor.java:57) at org.terracotta.context.extractor.ObjectContextExtractor.extract(ObjectContextExtractor.java:50) at org.terracotta.context.ContextManager.getOrCreateTreeNode(ContextManager.java:129) at org.terracotta.context.ContextManager.associate(ContextManager.java:114) at org.terracotta.context.ContextManager.access$000(ContextManager.java:39) at org.terracotta.context.ContextManager$1.withParent(ContextManager.java:64) at net.sf.ehcache.constructs.EhcacheDecoratorAdapter.<init>(EhcacheDecoratorAdapter.java:68) at net.sf.ehcache.constructs.blocking.BlockingCache.<init>(BlockingCache.java:93) at net.sf.ehcache.constructs.blocking.BlockingCache.<init>(BlockingCache.java:106) at net.sf.ehcache.constructs.blocking.SelfPopulatingCache.<init>(SelfPopulatingCache.java:58) at com.atlassian.cache.ehcache.EhCacheManager$3.get(EhCacheManager.java:142) at com.atlassian.cache.ehcache.EhCacheManager$3.get(EhCacheManager.java:136) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:303) at com.atlassian.cache.ehcache.EhCacheManager.createComputingCache(EhCacheManager.java:135) at com.atlassian.cache.impl.AbstractCacheManager.getCache(AbstractCacheManager.java:179) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy188.getCache(Unknown Source) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy188.getCache(Unknown Source) at com.almworks.jira.structure.services2g.itemtracker.AOBasedItemTracker$ProductionEnv.getCache(AOBasedItemTracker.java:746) {code}
    via by Igor Sereda [ALM Works],
    • java.lang.NullPointerException at org.terracotta.context.extractor.ObjectContextExtractor.extractInstanceAttribute(ObjectContextExtractor.java:57) at org.terracotta.context.extractor.ObjectContextExtractor.extract(ObjectContextExtractor.java:50) at org.terracotta.context.ContextManager.getOrCreateTreeNode(ContextManager.java:129) at org.terracotta.context.ContextManager.associate(ContextManager.java:114) at org.terracotta.context.ContextManager.access$000(ContextManager.java:39) at org.terracotta.context.ContextManager$1.withParent(ContextManager.java:64) at net.sf.ehcache.constructs.EhcacheDecoratorAdapter.<init>(EhcacheDecoratorAdapter.java:68) at net.sf.ehcache.constructs.blocking.BlockingCache.<init>(BlockingCache.java:93) at net.sf.ehcache.constructs.blocking.BlockingCache.<init>(BlockingCache.java:106) at net.sf.ehcache.constructs.blocking.SelfPopulatingCache.<init>(SelfPopulatingCache.java:58) at com.atlassian.cache.ehcache.EhCacheManager$3.get(EhCacheManager.java:142) at com.atlassian.cache.ehcache.EhCacheManager$3.get(EhCacheManager.java:136) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:303) at com.atlassian.cache.ehcache.EhCacheManager.createComputingCache(EhCacheManager.java:135) at com.atlassian.cache.impl.AbstractCacheManager.getCache(AbstractCacheManager.java:179) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy188.getCache(Unknown Source) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy188.getCache(Unknown Source) at com.almworks.jira.structure.services2g.itemtracker.AOBasedItemTracker$ProductionEnv.getCache(AOBasedItemTracker.java:746)
    No Bugmate found.