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

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

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>

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

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.

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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 4 hours ago in Hipchat

Moving from Hipchat to Stride? Here’s what you’ll love

Heya, Hipchat friends! We’re so happy you’re checking out   Stride. Whether you know it or not, you have been instrumental in making Stride come to life. Every feature, design, and functionality...

21 views 0 3
Read article

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