It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confluence cloud - failed to import space - ConstraintViolationException Edited

This is the error I am getting:error.PNG

and then I tried to factory reset confluence and done a another import, still having errors, and this time is a different one:

com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: could not execute statement; SQL [n/a]; constraint [uk_jp1ad5yufsih5r7lqrygakpug]; nested exception is org.hibernate.exception.Constraint

Could anyone help, please. Thank you.


1 answer


Could you confirm with us from what version of Confluence the space export originated?

Did the export not complete despite the error? I have had quite a few exports that errored out but still ended up completing.



If you are still having the problem you can also let me know your Cloud instance details and the name of the space you are trying to import, and if you have the export stored anywhere that I can try to import it from your site.


Hi Shannon,

Thank you for your response. with some help from a colleague, we have figured out what the issue is, i.e. why successfully exported file cannot be successfully imported: The space has previously been exported and imported before, so there are duplicated spaceName and key in the export .xml file and properties file. Some lines has the key of "“HTWTR” whereas other lines has the key of “EIP”.

I am not sure about the cloud instance details. I still need to import the contents, which are in a confluence export zip file contains the attachment folder with all attachments, a .xml file and a properties file.

I don't have the .xml file and property file with me right now (I m using my home computer, not work computer right now).

Do you have any suggestions? I was going to raise a Confluence support case for getting help from someone to correct the .xml file and properties file.

Hi Sharon,

The workaround would be to delete the space from the Confluence instance prior to importing it again. You can do so from the UI in your instance, or the Cloud team can help delete it from the database for you. It is preferred that the space is deleted via the UI.

To do it through the database, we will need to know your Cloud URL and the exact space name/key that you want us to delete. You also need to be one of the primary contacts in order to approve that we delete the space.

The workaround you mentioned of renaming the space in the XML is the 3rd option. You want to follow the THIRD resolution in How to Copy or Rename a Space in Confluence. Please note that this solution is not supported by Atlassian Support. Therefore, we can help guide you through it here if you get stuck.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

3,867 views 15 38
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you