Site import fails with "Error while importing backup: com.atlassian.confluence.spacealias.SpaceAlias"

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

When importing a site backup from Confluence Cloud into an on-prem instance of Confluence Data Center, the import fails with the following error:

(Auto-migrated image: description temporarily unavailable)

The following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 2024-08-21 15:27:11,194 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.DefaultImportProcessor] persist Error while saving object: Imported[com.atlassian.confluence.spacealias.SpaceAlias] [Id[id]=3542450126, Property[spaceId]=3542450124, Property[lowerSpaceAlias]=~712020c33a56b2496c4fbfa1aecf5412c0279f, Property[active]=true, Property[lastModifierAAID]=712020:c33a56b2-496c-4fbf-a1ae-cf5412c0279f, Property[creatorAAID]=712020:c33a56b2-496c-4fbf-a1ae-cf5412c0279f, Property[lastModificationDate]=2024-08-14 07:30:25.393, Property[creationDate]=2024-08-14 07:30:25.393] -- url: /longrunningtaskxml.action | referer: http://127.0.0.1:8090/admin/restore-local-file.action | traceId: 59ef3caa8cb0392a | userName: admin | action: longrunningtaskxml 2024-08-21 15:27:11,195 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- url: /longrunningtaskxml.action | referer: http://127.0.0.1:8090/admin/restore-local-file.action | traceId: 59ef3caa8cb0392a | userName: admin | action: longrunningtaskxml com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: com.atlassian.confluence.spacealias.SpaceAlias <...snip...> Caused by: org.xml.sax.SAXException: Error while importing backup: com.atlassian.confluence.spacealias.SpaceAlias java.lang.ClassNotFoundException: com.atlassian.confluence.spacealias.SpaceAlias

Cause

SpaceAlias is a new object type in the cloud export file that Confluence Data Center instances are not yet aware of, so cannot be parsed correctly.

Workaround

  1. Unzip your .zip backup file that was created on your cloud instance

  2. Locate and edit entities.xml

  3. Find any SpaceAlias object blocks, like this one:

    1 2 3 4 5 6 7 8 <object class="SpaceAlias" package="com.atlassian.confluence.spacealias"> <id name="id">37289988</id> <property name="spaceId">98541</property> <property name="lowerSpaceAlias"><![CDATA[a5]] ></property> <property name="active">true</property> <property name="lastModifierAAID"/><property name="creatorAAID"/><property name="lastModificationDate">2024-08-19 20:01:55.797</property> <property name="creationDate">2024-08-19 20:01:55.797</property> </object>
  4. Remove those SpaceAlias object blocks and save the file. Note: There are usually multiple objects of this type within a cloud export zip.

  5. Zip up all the files again (including the modified entities.xml).

    Important: Ensure that the files you're zipping up are at the root of the archive, and not nested under a subdirectory. In other words, do not put all the backup files under a directory and simply zip up the directory. Doing this will cause the the restore to fail when you attempt to import the space into Confluence.

  6. Run the import in your on-prem Confluence Data Center instance.

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.