Site import fails with "Error while importing backup: com.atlassian.confluence.spacealias.SpaceAlias"
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
症状
When importing a site backup from Confluence Cloud into an on-prem instance of Confluence Data Center, the import fails with the following error:
atlassian-confluence.log
に次のエラーが返される。
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
原因
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.
回避策
- Unzip your .zip backup file that was created on your cloud instance
- Locate and edit entities.xml
Find any SpaceAlias object blocks, like this one:
<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>
- Remove those SpaceAlias object blocks and save the file. Note: There are usually multiple objects of this type within a cloud export zip.
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.
- Run the import in your on-prem Confluence Data Center instance.