Importing project data fails with Unexpected import failure due to CustomFieldValue with no value

お困りですか?

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

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

  

要約

Importing a project with Project Configurator results in error, with this stack in the logs:

2022-01-12 11:18:54,794 JiraTaskExecutionThread-79 ERROR jira 123x123x1 abc2ab 192.168.1.100 /secure/complete-project-import!resumeImportFromSimulation.jspa [c.a.j.imports.xml.DefaultBackupXmlParser] Unexpected import failure
java.lang.NullPointerException
	at com.atlassian.jira.imports.project.customfield.TextLengthValidatingCustomFieldImporter.canMapImportValue(TextLengthValidatingCustomFieldImporter.java:24)
	at com.atlassian.jira.imports.project.handler.CustomFieldValueValidatorHandler.validateCustomFieldValueWithField(CustomFieldValueValidatorHandler.java:98)
	at com.atlassian.jira.imports.project.handler.CustomFieldValueValidatorHandler.handleEntity(CustomFieldValueValidatorHandler.java:73)
	at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endTopLevelElement(ChainedOfBizSaxHandler.java:221)
	at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endElement(ChainedOfBizSaxHandler.java:169)
	at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endElement(ChainedOfBizSaxHandler.java:136)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103)
	at com.atlassian.jira.imports.xml.DefaultBackupXmlParser$XmlParser.parseXml(DefaultBackupXmlParser.java:115)
	at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parse(DefaultBackupXmlParser.java:64)
	at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseXml(DefaultBackupXmlParser.java:52)
	at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseOfBizBackupXml(DefaultBackupXmlParser.java:41)
	at com.atlassian.jira.imports.project.DefaultProjectImportManager.validateCustomFieldValues(DefaultProjectImportManager.java:756)
	at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.validateAndAutoMapFields(DefaultProjectImportService.java:634)
	at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.doMapping(DefaultProjectImportService.java:322)
	at com.awnaba.projectconfigurator.transporter.engine.JiraDataImporter.jiraImportData(JiraDataImporter.java:295)
...


原因

This is caused when the entities.xml contains a CustomfieldValue entry for a text custom field with no value.
For example:

<CustomFieldValue id="20140" issue="15275" customfield="10706"/>


ソリューション

この問題の解決方法

  1. Unzip the project dump zip;
  2. Unzip the data.zip file;
  3. Open the entities.xml file;
  4. Remove the line with the incomplete CustomFieldValue entry, as the example above;
  5. Zip the activeobjects.xml and entities.xml together into the data.zip again;
    (info) Be careful to zip just the files! If you zip the directory above it, the file structure might be changed, and a different error will happen on import;
  6. Zip the original directories (data and attachments) with the coinfig.xml file;
  7. Import the project.


最終更新日: 2022 年 1 月 20 日

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

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