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

FIx NPE in ConfluenceEventListenerwith Struts - analytics-for-confluence

      Issue Summary

      NPE in ConfluenceEventListenerwith Struts

      Steps to Reproduce

      Use Rest watch API

      Expected Results

      No exception

      Actual Results

      The below exception is thrown in the xxxxxxx.log file:

      2022-08-02 06:47:30,194 ERROR [Long running task: Space removal long running task] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.confluence.event.events.content.page.PageRemoveEvent@4434911d[page=page: Test Space 1229825022930 Home v.1 (100154),suppressNotifications=false,timestamp=1659422850187]] from the invoker [com.atlassian.event.internal.ComparableListenerInvoker@2e5d83e1]
       -- url: /confluence/rest/api/space/TEST1229825022930 | userName: admin | traceId: 06da8eb896a8238d
      Caused by: java.lang.NullPointerException
          at org.apache.struts2.ServletActionContext.getRequest(ServletActionContext.java:113) ~[org.apache.struts_struts2-core-2.5.30-atlassian-3-m02.jar:2.5.30-atlassian-3-m02]
          at com.addonengine.addons.analytics.event.ConfluenceEventListener.publishAsyncEvent(ConfluenceEventListener.kt:158) ~[?:?]
          at com.addonengine.addons.analytics.event.ConfluenceEventListener.onPageRemoveEvent(ConfluenceEventListener.kt:106) ~[?:?]
          at jdk.internal.reflect.GeneratedMethodAccessor1614.invoke(Unknown Source) ~[?:?]
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
          at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
          at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42) ~[com.atlassian.event_atlassian-event-5.0.1.jar:?]
          ... 78 more
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

          Form Name

            [CONFSERVER-79607] FIx NPE in ConfluenceEventListenerwith Struts - analytics-for-confluence

            There are no comments yet on this issue.

              qpham@atlassian.com Quan Pham
              ggautam Ganesh Gautam
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: