Restoring an XML Backup Fails due to Exception is org.xml.sax.SAXParseException

お困りですか?

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

コミュニティに質問

症状

Restoring or importing an xml backup fails and the user may see the following error:

 

The following or a variation of it appears in the atlassian-jira.log:

[Fatal Error] :164021:3: The element type "CustomFieldValue" must be terminated by the matching end-tag "</CustomFieldValue>".
2013-02-07 13:43:15,954 JiraImportTaskExecutionThread-1 ERROR anonymous 823x14x1 fbaod1 0:0:0:0:0:0:0:1%0 /secure/SetupImport.jspa [jira.bc.dataimport.DefaultDataImportService] Error parsing export file: org.xml.sax.SAXParseException: The element type "CustomFieldValue" must be terminated by the matching end-tag "</CustomFieldValue>".
org.xml.sax.SAXParseException: The element type "CustomFieldValue" must be terminated by the matching end-tag "</CustomFieldValue>".
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.parseXmlAndValidateBackupData(DefaultDataImportService.java:299)
	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:229)
	at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:65)

原因

JIRA is unable to parse the XML file due to an invalid tag closure.  This causes a premature break in the file and JIRA is unable to complete the operation.

回避策

Please try running an xml syntax checker of your choice on the entities.xml file from the backup zip.

Ensure that you create a copy of your backup first

For example, running xmllint on the entities.xml file from the failed backup will report an error where an xml is broken.

[~/jira.5.2.5/jira/jirahome/import] xmllint entities.xml
entities.xml:164021: parser error : Opening and ending tag mismatch: CustomFieldValue line 1105 and entity-engine-xml
</entity-engine-xml>
                    ^
entities.xml:164022: parser error : Premature end of data in tag entity-engine-xml line 1013
  • From here, you can correct the broken tag as indicated in the syntax checker. In the above example, it means adding the tag: 
    </entity-engine-xml>
  • or you can simply attempt to export you data once more, and please try importing again.  
最終更新日 2018 年 11 月 2 日

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

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