PK violation importing an XML backup of a space

Hi,

I have been struggling to get an xml export imported into a brand new 3.5.13 system. I have worked with Atlassian support but their involvement has been very limited because this version is no longer supported.

The export came from a system that has been running for a few year is Linux based and, is using ORACLE 11g as its database. The system that I am having trouble importing to is using MS SQL xPress 2008 R2. The DB server was built with case sensitivity (SQL_Latin1_General_CP1_CS_AS) as suggested in this article:

https://confluence.atlassian.com/display/CONF35/Database+Setup+for+SQL+Server

The DB is running on the same box as the Confluence application. I set up the connection as JDBC, here is the connection string: jdbc:jtds:sqlserver://msp0weiat001.etdbw.com:1433/confluence

The Confluence server that I am having trouble importing to is a Windows 2008 R2 SE SP1 64bit. This is a brand new install with no existing data other than what comes default with the installer. 

 

Related Link to KBase article I found:

https://confluence.atlassian.com/display/CONFKB/Unable+to+Import+Space+due+to+Primary+Key+Constraint

The export was done using an admin account and the include all files option was selected. Also, Atlassian support was able to import the file without issue so it appears to be something either with the DB server or my installation.

 

The error I am seeing during the import process:

Import failed. Check your server logs for more information. Hibernate operation: could not insert: 

com.atlassian.confluence.core.BodyContent#617027; SQL []; Violation of 
PRIMARY KEY constraint 'PK_BODYCONT_D49B339249C3F6B7'. Cannot insert 
duplicate key in object 'dbo.BODYCONTENT'. The duplicate key value is 
(617027).; nested exception is java.sql.SQLException: Violation of PRIMARY 
KEY constraint 'PK_BODYCONT_D49B339249C3F6B7'. Cannot insert duplicate 
key in object 'dbo.BODYCONTENT'. The duplicate key value is (617027).


Any insight into what may be happening here will be greatly appreciated.

1 answer

This widget could not be displayed.

Hey Mario,

When I got a similar case to this with other 5 customers I made the following actions:

  1. Ask then to set up a staging environment.
  2. Upgrade their confluence from 3.5.* to 5.0.3 and then latest version with current database.
  3. Then generate the export and try importing again.

From 5 of those cases 4 were able to import fine (some of our upgrade tasks addressed the inconsistencies), the last one we needed to further troubleshoot the database.

We do not support EOL versions (as you already know), however since we are having troubles on that version one approach I like to use is to bring the fight to a familiar ground (Confluence 5 series), if we do that we gonna have further troubleshooting options to try laugh.

I will add myself as a watcher in your case, if you agree with that plan let me know trough here so I can assist the assigned engineer.

 

Thanks and Regards,
David| The Engineer that like Windows for realsies.

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

288 views 2 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you