Space import fails with "No enum constant com.atlassian.confluence.spaces.SpaceStatus"

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

When importing a space XML backup into Confluence, the import fails with an error on screen like so:

atlassian-confluence.log に次のメッセージが表示される。

2014-05-29 11:17:34,695 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: 
 -- url: /admin/restore.action | userName: admin | referer: http://confluence.example.com:8090/admin/backup.action | action: restore
com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: No enum constant com.atlassian.confluence.spaces.SpaceStatus.
	at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:76)
	at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:404)
	at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:372)
	at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:138)
	at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:210)
...

原因

SpaceStatus is a property in the backup file that requires one of two values, "CURRENT" or "ARCHIVED". The error is thrown if neither exist.

回避策

  1. Unzip your XML .zip backup file
  2. Locate and edit entities.xml
  3. Find the following property:

    <property name="spaceStatus" enum-class="SpaceStatus" package="com.atlassian.confluence.spaces"/>
  4. Replace it with the following:

    <property name="spaceStatus" enum-class="SpaceStatus" package="com.atlassian.confluence.spaces">CURRENT</property>

    If you want the space to be marked as Archived, used "ARCHIVED" instead of "CURRENT" for the property value.

  5. Zip up all the files again.

    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.

最終更新日 2016 年 3 月 30 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.