Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence import of 3.5.9 space into 3.5.17 fails with Violation of PRIMARY KEY

Guenter Huber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2012

Hi!

As a test case I tried to import a 3.5.9 exported space into 3.5.17.

We had exported say SPACE1 from our production system and changed entities.xml according to
https://confluence.atlassian.com/display/CONF35/Copy+Or+Rename+A+Space

The import into our production 3.5.9 as say SPACE2 worked perfectly.

When I do the same with 3.5.17 (last 3.5.x) it fails with

Import failed. Check your server logs for more information.
Hibernate operation: could not insert: [com.atlassian.confluence.labels.Labelling#720969];
SQL []; Violation of PRIMARY KEY constraint 'PK__CONTENT___3214EC27FB627BCE'.
Cannot insert duplicate key in object 'dbo.CONTENT_LABEL'.
The duplicate key value is (720969).; nested exception is java.sql.SQLException:
Violation of PRIMARY KEY constraint 'PK__CONTENT___3214EC27FB627BCE'.
Cannot insert duplicate key in object 'dbo.CONTENT_LABEL'. The duplicate key value is (720969).

Back end is a SQL Server 2012.
Thx
G.

3 answers

1 accepted

0 votes
Answer accepted
Guenter Huber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2012

Well, the simple, but sad thing is:

3.5.9 and the last 3.5.x (3.5.17) are NOT compatible in some respect. Space import into the EXACTLY same version worked. <sigh>

0 votes
Guenter Huber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 9, 2012

This is really disturbing!

Just tried the import of the space on a 3.5.9 install (the exact version we are at) and it went without a hitch!

So apparently Confluence space import is NOT even compatible on a revision level!

Your understanding (documentation) of major and minor versions and revision levels is "interesting" too.

Some insight would be appreciated.
G.

0 votes
JohnA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2012

Hi G,

Can you confirm whether you are using a case-sensitive collation scheme for your SQL Server database because this is the most common cause of issues such as this one? We recommend usingthe "SQL_Latin1_General_CP1_CS_AS" collation scheme, so if you are not using this scheme then please run the SQL below to convert the collation scheme of your database.

ALTER DATABASE &lt;database_name&gt; COLLATE SQL_Latin1_General_CP1_CS_AS

All the best,
John

Guenter Huber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2012

Thanks for the attempt, John,

I m not at my workplace, but I m positive that I got a case sensitive collation exactly with the above command.

But if you had had a single thoughtful glance at the error message you would have seen that the key is an integer field.

G.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events