Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-40211

Confluence Analytics events fail with a NullPointerException

XMLWordPrintable

      Summary

      When Confluence attempts to send certain analytics, it can fail with a NullPointerException.

      Steps to Reproduce

      It's not entirely clear how this is reproduced reliably.

      Expected Results

      The exception is not thrown and the analytics are sent without error.

      Actual Results

      The below exception is thrown:

      2015-12-10 10:26:42,429 ERROR [analyticsEventProcessor:thread-1] [analytics.client.listener.ProductEventListener] run Failed to send analytics event com.atlassian.analytics.api.events.MauEvent@8434fcf8 
      com.atlassian.cache.CacheException: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException 
      at com.atlassian.cache.ehcache.DelegatingCache.get(DelegatingCache.java:101) 
      at com.atlassian.confluence.cache.ehcache.DefaultConfluenceEhCache.get(DefaultConfluenceEhCache.java:46) 
      at com.atlassian.confluence.cache.ConfluenceMonitoringCache.get(ConfluenceMonitoringCache.java:49) 
      at com.atlassian.analytics.client.serialize.EventSerializer.hashEmailPropertyForMauEvent(EventSerializer.java:149) 
      at com.atlassian.analytics.client.serialize.EventSerializer.access$900(EventSerializer.java:34) 
      at com.atlassian.analytics.client.serialize.EventSerializer$2.get(EventSerializer.java:138) 
      at com.atlassian.analytics.client.serialize.EventSerializer$2.get(EventSerializer.java:75) 
      at com.atlassian.analytics.client.listener.ProductEventListener$1.run(ProductEventListener.java:117) 
      at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:34) 
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
      at java.lang.Thread.run(Thread.java:745) 
      Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException 
      at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149) 
      at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112) 
      at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:87) 
      at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher.hashInternal(BcryptAnalyticsEmailHasher.java:45) 
      at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher.hash(BcryptAnalyticsEmailHasher.java:40) 
      at com.atlassian.analytics.client.serialize.EventSerializer$1.load(EventSerializer.java:65) 
      at com.atlassian.analytics.client.serialize.EventSerializer$1.load(EventSerializer.java:62) 
      at com.atlassian.cache.ehcache.LoadingCache.getFromLoader(LoadingCache.java:145) 
      at com.atlassian.cache.ehcache.LoadingCache.loadValueAndReleaseLock(LoadingCache.java:100) 
      at com.atlassian.cache.ehcache.LoadingCache.get(LoadingCache.java:76) 
      at com.atlassian.cache.ehcache.DelegatingCache.get(DelegatingCache.java:96) 
      ... 13 more 
      Caused by: java.lang.NullPointerException 
      at java.io.Reader.<init>(Reader.java:78) 
      at java.io.InputStreamReader.<init>(InputStreamReader.java:113) 
      at org.apache.commons.io.IOUtils.copy(IOUtils.java:1906) 
      at org.apache.commons.io.IOUtils.toString(IOUtils.java:778) 
      at org.apache.commons.io.IOUtils.toString(IOUtils.java:759) 
      at com.atlassian.analytics.client.hash.reader.RemoteHashingInstructionsReader.readInstructions(RemoteHashingInstructionsReader.java:27) 
      at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher$HashingInstructionsResettableLazyReference.create(BcryptAnalyticsEmailHasher.java:154)
      at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher$HashingInstructionsResettableLazyReference.create(BcryptAnalyticsEmailHasher.java:144)
      at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:140) 
      at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321) 
      at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143) 
      ... 23 more

      Workaround

      Disabling the Analytics and the below add-ons will prevent this exception from being thrown. Please note it's a spurious exception that prevents analytics being thrown however will not affect how Confluence operates outside of sending analytics.

      • Confluence Analytics Whitelist Plugin
      • Analytics Client Plugin and
      • Analytics Whitelist Plugin

              ltran ltran
              mkhairuliana Monique Khairuliana (Inactive)
              Votes:
              28 Vote for this issue
              Watchers:
              49 Start watching this issue

                Created:
                Updated:
                Resolved: