Failure during space import

  1. Install and setup Confluence 5.4.4
  2. Add 2 users
  3. Create space, add page
  4. Log in as user1 and add to favourites a page from this space
  5. Log in as user2 and add to favourites the same page
  6. Export space to XML
  7. Install and setup Confluence 5.4.4 (to start clean again)
  8. Add 2 users
  9. Import space from
  10. Get error "Import failed. Check your server logs for more information. duplicate key: class=class com.atlassian.confluence.labels.Label"
  11. Go to dashboard
  12. Space is there
  13. Log in as user1
  14. Observe that page you favourited is listed two times under your favourite pages
  15. Log in as user2
  16. Observe that page you favourited is not listed at all under your favourite pages

In the log file:

2014-04-24 20:10:26,371 ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import
 -- referer: http://localhost:1990/confluence/admin/backup.action | url: /confluence/admin/restore-local-file.action | userName: admin | action: restore-local-file
java.lang.IllegalArgumentException: duplicate key: class=class com.atlassian.confluence.labels.Label,id=1212417,<null>
        at com.atlassian.confluence.importexport.DefaultImmutableImportProcessorSummary.newInstance(
        at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
        at $Proxy77.performImport(Unknown Source)
        at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(
        at java.util.concurrent.Executors$
        at java.util.concurrent.FutureTask$Sync.innerRun(
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$

There are duplicate entries in the CONTENT_LABEL table (on labelid + contentid).

  1. Is this error harmless besides messing with favourites?
  2. Is it a known issue?

3 answers

I have experienced the same thing. Is there any other problems than the favorites thing? Does the import stop when the error occurs or does it continue until the end?

After further investigation I found out it depends on order of elements in the export XML file. Order is somewhat random. If you're unlucky you end up with objects of class ConfluenceUserImpl being after objects of class Label. Space import fails in that case (if you have a page favourited by two users).

@Rp Subhub,

Thanks for reporting your findings on this. I found it while doing tests on this same bug and guided me to the cause and a workaround thumbs-up

There is now a bug for this behaviour at

Thanks again!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Goff-Dupont
Published 2 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

37 views 2 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