java.lang.NullPointerException

Atlassian JIRA | Igor Sereda [ALM Works] | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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}

    Atlassian JIRA | 3 years ago | Igor Sereda
    java.lang.NullPointerException
  2. 0

    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}

    Atlassian JIRA | 3 years ago | Igor Sereda [ALM Works]
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.terracotta.context.extractor.ObjectContextExtractor.extractInstanceAttribute()
    2. org.terracotta.context
      ContextManager$1.withParent
      1. org.terracotta.context.extractor.ObjectContextExtractor.extractInstanceAttribute(ObjectContextExtractor.java:57)
      2. org.terracotta.context.extractor.ObjectContextExtractor.extract(ObjectContextExtractor.java:50)
      3. org.terracotta.context.ContextManager.getOrCreateTreeNode(ContextManager.java:129)
      4. org.terracotta.context.ContextManager.associate(ContextManager.java:114)
      5. org.terracotta.context.ContextManager.access$000(ContextManager.java:39)
      6. org.terracotta.context.ContextManager$1.withParent(ContextManager.java:64)
      6 frames
    3. Ehcache
      SelfPopulatingCache.<init>
      1. net.sf.ehcache.constructs.EhcacheDecoratorAdapter.<init>(EhcacheDecoratorAdapter.java:68)
      2. net.sf.ehcache.constructs.blocking.BlockingCache.<init>(BlockingCache.java:93)
      3. net.sf.ehcache.constructs.blocking.BlockingCache.<init>(BlockingCache.java:106)
      4. net.sf.ehcache.constructs.blocking.SelfPopulatingCache.<init>(SelfPopulatingCache.java:58)
      4 frames
    4. com.atlassian.cache
      EhCacheManager$3.get
      1. com.atlassian.cache.ehcache.EhCacheManager$3.get(EhCacheManager.java:142)
      2. com.atlassian.cache.ehcache.EhCacheManager$3.get(EhCacheManager.java:136)
      2 frames
    5. com.atlassian.util
      ManagedLocks$ManagedLockImpl.withLock
      1. com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:303)
      1 frame
    6. com.atlassian.cache
      AbstractCacheManager.getCache
      1. com.atlassian.cache.ehcache.EhCacheManager.createComputingCache(EhCacheManager.java:135)
      2. com.atlassian.cache.impl.AbstractCacheManager.getCache(AbstractCacheManager.java:179)
      2 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    8. com.atlassian.plugin
      DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke
      1. com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      1 frame
    9. com.sun.proxy
      $Proxy188.getCache
      1. com.sun.proxy.$Proxy188.getCache(Unknown Source)
      1 frame
    10. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    11. com.atlassian.plugin
      HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke
      1. com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
      1 frame
    12. com.sun.proxy
      $Proxy188.getCache
      1. com.sun.proxy.$Proxy188.getCache(Unknown Source)
      1 frame
    13. com.almworks.jira
      AOBasedItemTracker$ProductionEnv.getCache
      1. com.almworks.jira.structure.services2g.itemtracker.AOBasedItemTracker$ProductionEnv.getCache(AOBasedItemTracker.java:746)
      1 frame