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

NullPointerException in PageEditedPayloadTransformer.getOriginalId

      While trying to render notifications for page edits, PageEditedPayloadTransformer can get NullPointerExceptions while calling getOriginalId. This is because the PageEditedEvent is not required to contain the original page id - it can be null. The code needs to not implicitly cast a Long to a long, since that's causing the null pointer exception in this case.

      Example stack trace:

      2015-04-08 11:35:19,868 ERROR [AtlassianEvent::CustomizableThreadFactory-4] [confluence.notifications.impl.NotificationsEventDispatcher] errorOrDebug Error during notification dispatch : null
       -- referer: http://localhost:1990/confluence/admin/viewplugins.action | url: /confluence/admin/olduploadplugin.action | userName: admin | action: olduploadplugin
      java.lang.NullPointerException
        at com.atlassian.confluence.notifications.content.transformer.PageEditedPayloadTransformer.getOriginalId(PageEditedPayloadTransformer.java:20)
        at com.atlassian.confluence.notifications.content.transformer.PageEditedPayloadTransformer.getOriginalId(PageEditedPayloadTransformer.java:12)
        at com.atlassian.confluence.notifications.content.ContentEditedPayloadTransformer.checkedCreate(ContentEditedPayloadTransformer.java:12)
        at com.atlassian.confluence.notifications.PayloadTransformerTemplate.create(PayloadTransformerTemplate.java:38)
        at com.atlassian.confluence.notifications.impl.NotificationsEventDispatcher.handleEventInternal(NotificationsEventDispatcher.java:87)
        at com.atlassian.confluence.notifications.impl.NotificationsEventDispatcher.handleEvent(NotificationsEventDispatcher.java:58)
        at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)
        at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48)
        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)
      

            [CONFSERVER-37161] NullPointerException in PageEditedPayloadTransformer.getOriginalId

            Atlassian Update - 11 April 2025

            Hi,

            At Atlassian, our goal is to ensure we’re providing the best experience for our customers. With our new Data Center strategy, Atlassian's focus is on security, compliance, and performance and is a key driver in prioritizing bugs. Closing the bugs that do not fall into those categories will allow us to focus on the ones in the most current versions of our products.

            This bug is being closed due to a lack of engagement in the last four years, including no new watchers, votes, or comments; this inactivity suggests a low impact.

            Please note the comments on this thread are not being monitored.

            You can read more about our bug fix policy here and how we prioritize bugs.

            To learn more about our recent investments in Confluence Data Center, please check our public roadmap and dashboards containing recently resolved issues, current work, and future plans.

            Kind regards,
            Confluence Data Center

            George Varghese added a comment - Atlassian Update - 11 April 2025 Hi, At Atlassian, our goal is to ensure we’re providing the best experience for our customers. With our new Data Center strategy, Atlassian's focus is on security, compliance, and performance and is a key driver in prioritizing bugs. Closing the bugs that do not fall into those categories will allow us to focus on the ones in the most current versions of our products. This bug is being closed due to a lack of engagement in the last four years , including no new watchers, votes, or comments; this inactivity suggests a low impact. Please note the comments on this thread are not being monitored. You can read more about our bug fix policy here and how we prioritize bugs. To learn more about our recent investments in Confluence Data Center, please check our public roadmap and dashboards containing recently resolved issues , current work, and future plans . Kind regards, Confluence Data Center

            This is happening to me in a Confluence plugin.

            Saving changes to page body content using PageManager#saveContentEntity

            I see it in Confluence 6.13.0 but not in Confluence 7.7.2

            Ture Hoefner added a comment - This is happening to me in a Confluence plugin. Saving changes to page body content using PageManager#saveContentEntity I see it in Confluence 6.13.0 but not in Confluence 7.7.2

            Atlassian,

            What is the workaround to this bug so that my plugin can create new pages (using saveContentEntity) AND send a page created email.

            My customers are demanding this from me but I can't deliver. What is the workaround for this 3 yo bug?

            Thanks

            KC Integrations added a comment - Atlassian, What is the workaround to this bug so that my plugin can create new pages (using saveContentEntity) AND send a page created email. My customers are demanding this from me but I can't deliver. What is the workaround for this 3 yo bug? Thanks

            I am still getting this error in 6.10.2?

            KC Integrations added a comment - I am still getting this error in 6.10.2?

            Dmitry [Lucidchart] added a comment - - edited

            Actually 5.10 seems to have the fix too according to CONFSERVER-45018

            Dmitry [Lucidchart] added a comment - - edited Actually 5.10 seems to have the fix too according to CONFSERVER-45018

            This should be fixed in 6.x

            Dmitry [Lucidchart] added a comment - This should be fixed in 6.x

            This is still present in Confluence 5.9.5

            Dmitry [Lucidchart] added a comment - This is still present in Confluence 5.9.5

              Unassigned Unassigned
              richatkins Richard Atkins
              Affected customers:
              6 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: