Details
-
Bug
-
Resolution: Not a bug
-
Low
-
None
-
1
-
Severity 2 - Major
-
Description
Summary
When performing an import in Jira Server, the import will fail due to certain fields using the incorrect data
Environment
- Jira Server 8.0.2
- Postgres 9.6
Steps to Reproduce
- Generate backup from cloud instance
- Restore to JIRA Server 8.0.2
Expected Results
The import completes successfully
Actual Results
The import fails, with the following message in the UI:
Error importing data: java.lang.NumberFormatException: For input string: "2018-05-21 05:52:10.449712"
The following stack trace can be found in atlassian-jira.log:
2019-03-13 16:40:43,078 JiraImportTaskExecutionThread-1 ERROR admin 1000x275x1 12q1ai3 0:0:0:0:0:0:0:1 /secure/SetupImport.jspa [c.a.j.bc.dataimport.OfbizImportHandler] Failed to set attribute 'CustomFieldValue.updated' with value '2018-05-21 05:52:10.449712'. Error: For input string: "2018-05-21 05:52:10.449712" 2019-03-13 16:40:43,078 JiraImportTaskExecutionThread-1 ERROR admin 1000x275x1 12q1ai3 0:0:0:0:0:0:0:1 /secure/SetupImport.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.NumberFormatException: For input string: "2018-05-21 05:52:10.449712" java.lang.NumberFormatException: For input string: "2018-05-21 05:52:10.449712" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:589) at java.lang.Long.valueOf(Long.java:803) at org.ofbiz.core.entity.GenericEntity.setString(GenericEntity.java:391) at com.atlassian.jira.bc.dataimport.OfbizImportHandler.parseValue(OfbizImportHandler.java:306) at com.atlassian.jira.bc.dataimport.OfbizImportHandler.startElement(OfbizImportHandler.java:206) at org.apache.xerces.parsers.AbstractSAXParser.startElement(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.bc.dataimport.DefaultDataImportService.restoreData(DefaultDataImportService.java:897) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:740) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:324) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.unsafeCall(DataImportAsyncCommand.java:82) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:64) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:30) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:176) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:148) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Investigation
Looking at entities.xml, we can see the CustomFieldValue mentioned:
<CustomFieldValue id="10000" issue="10004" customfield="10013" textvalue="10000_*:*_1_*:*_4474_*|*_10001_*:*_1_*:*_0" created="2018-05-21 05:52:10.449712" updated="2018-05-21 05:52:10.449712"/>
In a Jira Server Instance, the created column does not exist, and the updated column is a unix epoch (and this is reflected in the database)
<CustomFieldValue id="10000" issue="10000" customfield="10106" updated="1550556055895" numbervalue="2.0"/>
Workaround
No workaround is available at this time.
Attachments
Issue Links
- Discovered while testing
-
JRACLOUD-71707 Importing from Jira Cloud to Server fails due to unknown entities
- Closed