NumberFormatException When Cancelling Page Edits

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

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

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

    DELETE FROM BODYCONTENT WHERE CONTENTID IN (SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE='DRAFT' AND CREATOR='username');
    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
Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.