"Page Not Found" error when attempting to save a new page

Still need help?

The Atlassian Community is here for you.

Ask the community

 

Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.

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

Problem

When attempting to create a new page and save it, the page does not save and redirects to a "Page Not Found" error. A draft of the page is saved and can be accessed, but the page itself will not save. 

The following appears in the atlassian-confluence.log:

2015-09-29 16:21:12,199 ERROR [http-nio-8090-exec-9] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event [ConfluenceTaskV2CreateEvent{user=com.atlassian.confluence.user.ConfluenceUserImpl@3e2759af[<user>,8af381ac4fd3b1e5014fd3c57b460002], task=Task [globalId=0, id=252, contentId=1212439, taskStatus=UNCHECKED, title=<title>  01 Nov 2015, description=, body=<body>   - ALL  <time datetime="2015-11-01" />, creator=<username>, assignee=null, createDate=Tue Sep 29 16:21:12 CDT 2015, dueDate=Sun Nov 01 00:00:00 CDT 2015, updateDate=null, completeUser=null, completeDate=null]}] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.plugins.tasklist.listener.InlineTasksEventListener.onTaskCreatedEvent(com.atlassian.confluence.plugins.tasklist.event.ConfluenceTaskV2CreateEvent) throws java.lang.Exception, listener=com.atlassian.confluence.plugins.tasklist.listener.InlineTasksEventListener@2efc3fab}]
 -- referer: http://<baseURL>/pages/createpage.action?useDraft=true&spaceKey=<sp>&draftId=1212417 | url: /pages/docreatepage.action | userName: <username> | action: docreatepage
java.lang.RuntimeException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:MySQL
	- version:5.6.23-log
	- minor version:6
	- major version:5
Driver:
	- name:MySQL Connector Java
	- version:mysql-connector-java-5.1.36 ( Revision: 4fc1f969f740409a4e03750316df2c0e429f3dc8 )
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'

Diagnosis

Environment

  • MySQL database

Cause

MySQL server is configured to have NO_AUTO_VALUE_ON_ZERO mode enabled. This particular SQL mode handles the AUTO_INCREMENT columns, which generate the next sequence number automatically. When NO_AUTO_VALUE_ON_ZERO mode is enabled, MySQL will only generate NULL as the next sequence number. This results in the inability for the AONotification table in the Confluence database to auto-increment the ID column by 1.

Resolution

  1. Stop Confluence.
  2. Stop MySQL.
  3. Edit the my.cnf file (often named my.ini on Windows operating systems or my.cnf on UNIX operating systems) in your MySQL server.
  4. Remove NO_AUTO VALUE_ON_ZERO from sql_mode.  Either delete the entire line or just delete the value if you have other parameters in sql_mode. Example: 

    // delete this line
    sql_mode = NO_AUTO_VALUE_ON_ZERO
  5. Start MySQL.
  6. Start Confluence.

 

Last modified on Mar 30, 2016

Was this helpful?

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