Error while importing project

Hello,

 

I wonder if someone came across with the following error while importing a project from one JIRA instance to another (JIRA version 7.1.1)

2016-04-01 01:47:03,483 JiraTaskExectionThread-6 ERROR shai.dahan 103x3090x1 13tcomw 195.244.215.4,127.0.0.1 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.xml.DefaultBackupXmlParser] Unexpected import failure
java.lang.NumberFormatException: null
        at java.lang.Long.parseLong(Unknown Source)
        at java.lang.Long.valueOf(Unknown Source)
        at com.atlassian.greenhopper.imports.SprintImportHandler.endTable(SprintImportHandler.java:105)
        at com.atlassian.jira.imports.project.ao.handler.ChainedAoSaxHandler.endTable(ChainedAoSaxHandler.java:260)
        at com.atlassian.jira.imports.project.ao.handler.ChainedAoSaxHandler.endElement(ChainedAoSaxHandler.java:187)
        at com.atlassian.jira.imports.project.ao.handler.ChainedAoSaxHandler.endElement(ChainedAoSaxHandler.java:148)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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.parseAoBackupXml(DefaultBackupXmlParser.java:46)
        at com.atlassian.jira.imports.project.DefaultProjectImportManager.importAoData(DefaultProjectImportManager.java:708)
        at com.atlassian.jira.imports.project.DefaultProjectImportManager.doImport(DefaultProjectImportManager.java:656)
        at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.doImport(DefaultProjectImportService.java:416)
        at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSummary$ProjectImportCallable.call(ProjectImportSummary.java:285)
        at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSummary$ProjectImportCallable.call(ProjectImportSummary.java:236)
        at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:453)
        at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:421)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216)
        at java.lang.Thread.run(Unknown Source)

After Re-indexing has been completed, I've noticed that all the project issues have but created but most of the agile related data (ranks and sprints) are missing.

 

Initially I thought it might to do with this bug https://confluence.atlassian.com/jirakb/project-import-fails-with-unexpected-import-failure-803603791.html, although it is slightly different error message, where it speaks orphaned rank values.

The cause of the import failure mentioned in this KB is that the rank values in the activeobjects.xml refer to a non-existing rank, where in my case it look like it is the sprint values.

However I couldn't find exactly how to rectify this issue.

The related tables in the database are:

  • AO_60DB71_SPRINT (contains all the sprint values)
  • AO_60DB71_SPRINTMARKER (this one is empty in my DB)

 

(The suggested workaround in that article doesn't apply to my case)

The project import fails by not creating the ranking and not importing the relevant information for the agile boards.

 

Any suggestions will highly appreciated.

1 answer

1 accepted

Did you check your atlassian-jira.log file for any errors reported before this exception ?

This error is most probably caused by the sprint was not being created thus the importer can not resolve it later when it tries to find the "new sprint"   corresponding  to a sprint id found in an issue being imported. You can check in the database if there are issues that have a value set for the Sprint field pointing to a non-existing sprint.

Do a select on the customfieldvalue table filtering by sprint field id and then and check if all of the sprint ids in the value column  actually exist in the AO_60DB71_SPRINT table

Hi Boris,

That is exactly the issue; how can I find the orphaned sprint values?
customfieldvalue  table contains only the following field values:

 

show columns from customfieldvalue;

+-------------+---------------+------+-----+---------+-------+

| Field       | Type          | Null | Key | Default | Extra |

+-------------+---------------+------+-----+---------+-------+

| ID          | decimal(18,0) | NO   | PRI | NULL    |       |

| ISSUE       | decimal(18,0) | YES  | MUL | NULL    |       |

| CUSTOMFIELD | decimal(18,0) | YES  |     | NULL    |       |

| PARENTKEY   | varchar(255)  | YES  |     | NULL    |       |

| STRINGVALUE | varchar(255)  | YES  |     | NULL    |       |

| NUMBERVALUE | decimal(18,6) | YES  |     | NULL    |       |

| TEXTVALUE   | longtext      | YES  |     | NULL    |       |

| DATEVALUE   | datetime      | YES  |     | NULL    |       |

| VALUETYPE   | varchar(255)  | YES  |     | NULL    |      

 

It doesn't hold any information on the sprint.



As for your first question, atlassian-jira.log file doesn't have any error prior to this exception.

tailing the catalina.out will show that the import process progress as plan up till the point it creates the custom field values and then it through the error:

 

 

2016-03-31 19:50:43,897 JiraTaskExectionThread-18 INFO shai.dahan 1187x5166x1 1iwblt9 10.79.2.31 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportManager] Finished creating the attachments.

2016-03-31 19:50:43,897 JiraTaskExectionThread-18 INFO shai.dahan 1187x5166x1 1iwblt9 10.79.2.31 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportManager] Creating custom field values.

2016-03-31 19:50:43,999 JiraTaskExectionThread-18 WARN shai.dahan 1187x5166x1 1iwblt9 10.79.2.31 /secure/admin/ProjectImportSummary.jspa [c.a.j.i.project.customfield.VersionCustomFieldImporter] The version custom field 'Found In Version' references a version with id '11704' that is an orphan value. The value will not be imported.

2016-03-31 19:50:44,011 JiraTaskExectionThread-18 WARN shai.dahan 1187x5166x1 1iwblt9 10.79.2.31 /secure/admin/ProjectImportSummary.jspa [c.a.j.i.project.customfield.VersionCustomFieldImporter] The version custom field 'Found In Version' references a version with id '11704' that is an orphan value. The value will not be imported.

2016-03-31 19:50:48,452 JiraTaskExectionThread-18 INFO shai.dahan 1187x5166x1 1iwblt9 10.79.2.31 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportManager] Finished creating custom field values.

2016-03-31 19:50:48,454 JiraTaskExectionThread-18 INFO shai.dahan 1187x5166x1 1iwblt9 10.79.2.31 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportManager] Importing Non Issue data.

2016-03-31 19:50:50,612 JiraTaskExectionThread-18 INFO shai.dahan 1187x5166x1 1iwblt9 10.79.2.31 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportManager] Finished creating custom field values.

2016-03-31 19:50:52,267 JiraTaskExectionThread-18 ERROR shai.dahan 1187x5166x1 1iwblt9 10.79.2.31 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.xml.DefaultBackupXmlParser] Unexpected import failure

java.lang.NumberFormatException: null

        at java.lang.Long.parseLong(Unknown Source)

        at java.lang.Long.valueOf(Unknown Source)

 

 

Hi Shai,

Here's how you can get the missing sprint values and see the custom field value to sprint mapping

-- MySQL 
-- Get the id of the Sprint field
SET @sprintField = (select id from customfield where cfname='Sprint');
-- Find non-existing sprints
select * from customfieldvalue where customfield = @sprintField
and stringvalue not in 
(select ID from AO_60DB71_SPRINT);
-- See all sprint field values and corresponding sprints
select sp.name, sp.ID, cf.*  from customfieldvalue cf
LEFT JOIN AO_60DB71_SPRINT sp ON sp.ID=cf.stringvalue
where customfield = @sprintField;

Can you send me the entire portion of the log between the import start and import start to boris.georgiev@botronsoft.com ?

 

Hello Boris,

Thank you for your help, I really appreciated it.

I've sent the log to your mailbox, so you can review it.

 

Actual resolution was to delete from the database the following entries:

 

delete from customfieldvalue where customfield = 10100 and stringvalue not in (select ID from AO_60DB71_SPRINT);

 

Apparently there were deleted sprints, which have still had traces in issues within the project.

in order to find these issues, I had to run the following JQL query:

id in (31521, 25535, 23651, 46305, 46981, 48148, 48480, 48755, 48756, 48758, 48760, 48761, 48777, 48853, 48856, 49128)

Instead of deleting this issues, I've removed the entries from custom field Sprint (10100)

 

Thank you Boris for pointing to the right direction,

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,096 views 13 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot