Dashboard > Confluence User Guides and Documents > ... > Troubleshooting FAQ > Edit page fails with 'DataIntegrityViolationException... Violation of PRIMARY KEY constraint'
Edit page fails with 'DataIntegrityViolationException... Violation of PRIMARY KEY constraint' Log In   View a printable version of the current page.

Added by meiyan.chan@atlassian.com, last edited by david.soul@atlassian.com on Jan 03, 2007  (view change)
Labels: 

Error

When trying to edit or save a page, an error screen is shown and the page is not updated.

org.springframework.dao.DataIntegrityViolationException: (HibernateTemplate): data integrity violated by SQL ''; 
nested exception is java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__CONTENT__5DCAEF64'. Cannot insert duplicate key in object 'CONTENT'
... 

Cause

Confluence is deployed twice in the application server. The Confluence install should only be manually deployed via confluence.xml or server.xml. If the Confluence install directory is under an application server directory which is being auto-deployed, such as under the Tomcat webapps directory, Confluence will be deployed a second time.

Solution

The Confluence install directory referenced by confluence.xml or server.xml must be moved to a directory outside of the application server, so that is it no longer auto-deployed. See the instructions for installing the Confluence EAR WAR edition.

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.1 Build:#916 Nov 09, 2007) - Bug/feature request - Contact Administrators