NumberFormatException When Cancelling Page Edits

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

When clicking "Cancel" in Confluence Editor to discard any changes to a page, the following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2012-10-22 22:21:23,956 ERROR [http-8043-6] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- url: /pages/doeditpage.action | userName: admin | referer: http://localhost:8043/pages/editpage.action?pageId=4064 java.lang.NumberFormatException: null at java.lang.Long.parseLong(Long.java:375) at java.lang.Long.parseLong(Long.java:468) at com.atlassian.confluence.pages.Draft.getPageIdAsLong(Draft.java:83) at com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction.getCancelResult(AbstractCreateAndEditPageAction.java:630) at com.atlassian.confluence.pages.actions.AbstractEditPageAction.getCancelResult(AbstractEditPageAction.java:296) at com.atlassian.confluence.core.CancellingInterceptor.intercept(CancellingInterceptor.java:20) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.xwork.HttpMethodValidationInterceptor.intercept(HttpMethodValidationInterceptor.java:72) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.websudo.WebSudoInterceptor.intercept(WebSudoInterceptor.java:63) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.themes.ThemeContextInterceptor.intercept(ThemeContextInterceptor.java:68) .....

This error may only occur to some users.

Cause

Confluence is not able to convert the Draft Page ID due to invalid format.

Workaround

  • Navigate to the User Menu > Drafts

  • Locate the offending pages draft(s) and delete them.

Resolution

  • Backup your Confluence database

  • Execute the following queries to delete the drafts of a specific user

    1 DELETE FROM BODYCONTENT WHERE CONTENTID IN (SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE='DRAFT' AND CREATOR='username');
    1 DELETE FROM CONTENT WHERE CONTENTTYPE='DRAFT' AND CREATOR='username';
  • Go to Confluence Admin > Cache Statistics and click "Flush All"

  • If the issue still persists, try to restart Confluence

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.