Summary

      When JIRA 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-11-21 09:11:31,231 analyticsEventProcessor:thread-1 ERROR gl66798-admin     [c.a.a.client.listener.ProductEventListener] Failed to send analytics event com.atlassian.analytics.api.events.MauEvent@19ff054d
      com.atlassian.cache.CacheException: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
      	at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:330)
      	at com.atlassian.analytics.client.serialize.EventSerializer.hashEmailPropertyForMauEvent(EventSerializer.java:111)
      	at com.atlassian.analytics.client.serialize.EventSerializer.toAnalyticsEvent(EventSerializer.java:84)
      	at com.atlassian.analytics.client.listener.ProductEventListener$1.run(ProductEventListener.java:112)
      	at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:38)
      	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:58)
      	at com.atlassian.cache.memory.MemoryCacheManager$3$1.load(MemoryCacheManager.java:132)
      	at com.atlassian.cache.memory.BlockingCacheLoader.load(BlockingCacheLoader.java:51)
      	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
      	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
      	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
      	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
      	at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:324)
      	... 9 more
      Caused by: java.lang.NullPointerException
      	at java.io.Reader.<init>(Reader.java:78)
      	at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
      	at org.apache.commons.io.IOUtils.copy(IOUtils.java:1407)
      	at org.apache.commons.io.IOUtils.copy(IOUtils.java:1433)
      	at org.apache.commons.io.IOUtils.toString(IOUtils.java:585)
      	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)
      	... 25 more

      Workaround 1. If there is no "Caused by: java.lang.NullPointerException" in the exception stack

      Please check if there are forward proxy settings in JIRA (setenv.sh) and if they are set correctly. Please reference this article for further details on how to configure outbound proxy for JIRA: https://confluence.atlassian.com/jirakb/how-to-configure-an-outbound-http-and-https-proxy-for-jira-applications-247857187.html

      Workaround 2. Please notice – this applies to JIRA Software only. If there's JIRA Service Desk installed in the same instance as JIRA Software, the steps below will disable the Service Desk application

      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 JIRA operates outside of sending analytics.

      • Atlassian JIRA - Plugins - Analytics whitelist
      • Analytics Client Plugin and
      • Analytics Whitelist Plugin

            [JRASERVER-47580] JIRA Analytics events fail with a NullPointerException

            Lou-Guardia added a comment -

            This has been open since 2015 and it is still not resolved? How is this possible. I just upgraded to the latest version 10.3.4 and I am seeing this issue.

            Lou-Guardia added a comment - This has been open since 2015 and it is still not resolved? How is this possible. I just upgraded to the latest version 10.3.4 and I am seeing this issue.

            Still facing the same issue in Jira Server v.9.2.0

            Torsten Schmidt added a comment - Still facing the same issue in Jira Server v.9.2.0

            Still facing the same issue in Jira Server v.8.20.7..

            Cengiz Akyildiz added a comment - Still facing the same issue in Jira Server v.8.20.7..

            Same. Facing the issue in Jira Server v8.5.7#805007 and we can´t clone issues anymore.

            Tobias Cieplik added a comment - Same. Facing the issue in Jira Server v8.5.7#805007 and we can´t clone issues anymore.

            Hi, facing this with JSW 8.13.4

            Sylvain Leduc added a comment - Hi, facing this with JSW 8.13.4

            I am facing this in 8.7.1

            Wim Kerstens added a comment - I am facing this in 8.7.1

            I am facing this issue in 7.9.2

             

            Saurabh Gupta added a comment - I am facing this issue in 7.9.2  

            vrowley added a comment -

            hchow  THANK YOU!  I skipped 7.0 and went to 7.1.10 and it came up.  It's got issues (no pun intended), but at least it's up.

            vrowley added a comment - hchow   THANK YOU!  I skipped 7.0 and went to 7.1.10 and it came up.  It's got issues (no pun intended), but at least it's up.

            Hi vrowley1,

            What version of JIRA are you currently running? The fix was made only to 7.1.0 onwards.

            If you are on a 7.0.x version the work around is to disable the analytics plugin entirely, rather than just opting out of analytics.

            I hope this helps!

            Herman Chow added a comment - Hi vrowley1 , What version of JIRA are you currently running? The fix was made only to 7.1.0 onwards. If you are on a 7.0.x version the work around is to disable the analytics plugin entirely, rather than just opting out of analytics. I hope this helps!

            vrowley added a comment -

            Am I missing something?  It's almost a year later and I'm getting this, same as awarycha1195333029

            vrowley added a comment - Am I missing something?  It's almost a year later and I'm getting this, same as  awarycha1195333029

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              gtanczyk Grzegorz Tanczyk (Inactive)
              Affected customers:
              24 This affects my team
              Watchers:
              54 Start watching this issue

                Created:
                Updated: