Project Import fail with com.atlassian.jira.exception.ParseException: Invalid label

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.

*Except Fisheye and Crucible

Summary

Problem

Trying to perform Project Import will fail with Invalid label error and the following appears in the atlassian-jira.log

1 2 2016-11-03 07:27:37,825 JiraTaskExectionThread-2 WARN XXXXX 440x1935x1 XXXXXX 172.18.16.192 /secure/admin/ProjectImportSelectProject.jspa [imports.project.handler.ChainedSaxHandler] Encountered a parsing exception. com.atlassian.jira.exception.ParseException: Invalid label 'something: 123456' specified.

Diagnosis

Database

  • Checking the source instance database for labels information with the following will show the affected label with blank space

    1 select * from label;

XML Backup

  • Unzipping the .zip file and run the following on the entities.xml will list the affected label with blank space

    1 grep '<Label' entities.xml

Cause

There is a blank space in one of the label value which is not expected. No space is allowed in a label.

Solution

Workaround

Manually remove the affected label from the database or from the entities.xml

  • From database

    • Create a database backup

    • delete the line that has the affected label

  • From entities.xml

    • Create a copy of entities.xml

    • delete the line that has the affected label eg: grep -v 'something:\ 123456' entities_copy.xml

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.