Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-62614

Project Import failed with error "Invalid label specified" if the project issue contains a label value with space

XMLWordPrintable

      Problem Definition

      Project Import failed with error There was a SAX parsing problem accessing the partitioned XML files: Invalid label 'xxxx' specified.. if any project issue has a label value with space

      Steps to Reproduce the Problem

      1. Create a test project and a test issue.
      2. Using a Word Processor such as Microsoft Word, create a bulleted list and type a word after the bullet.
      3. Copy the word and paste it as on the Labels field for a test issue.
      4. Generate a backup of the instance.
      5. Use Project Import to import the test project to another instance.

      Expected result

      The project will be imported successfully.

      Actual result

      The project import fails with error below on the UI of the Project Import page:

      There was a SAX parsing problem accessing the partitioned XML files: Invalid label '• You' specified..
      

      Stack trace below can be seen in atlassian-jira.log.

      2016-11-18 23:58:01,800 JiraTaskExectionThread-4 ERROR admin 1438x823x1 1wtdlxl 10.60.9.243 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportService] There was a problem accessing the partitioned XML files when performing a project import.
      org.xml.sax.SAXException: Invalid label '• You' specified.
      com.atlassian.jira.exception.ParseException: Invalid label '• You' specified.
      	at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endTopLevelElement(ChainedOfBizSaxHandler.java:225)
      	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)
      ...
      Caused by: com.atlassian.jira.exception.ParseException: Invalid label '• You' specified.
      	at com.atlassian.jira.imports.project.parser.LabelParserImpl.parse(LabelParserImpl.java:41)
      	at com.atlassian.jira.imports.project.handler.LabelsPersisterHandler.handleEntity(LabelsPersisterHandler.java:44)
      	at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endTopLevelElement(ChainedOfBizSaxHandler.java:221)
      	... 29 more
      

      Workaround

      1. Unzip the backup file and edit the entities.xml in a Text Editor.
      2. Find the line of the problematic value.
        • For example, {{<Label id="10203" issue="11700" label="• You"/>}}
      3. Remove all the space between the bullet and the word and save the file.
        • For example, <Label id="10203" issue="11700" label="•You"/>
      4. Zip the edited entities.xml with activeobjects.xml again and use this new zipped file for project import.
        Thanks to our awesome customer, epo973353089 for the workaround!

        1. Jira error ticket.jpg
          Jira error ticket.jpg
          99 kB
        2. label.gif
          label.gif
          232 kB

              Unassigned Unassigned
              0a7866175f4f Nishant Mehta
              Votes:
              6 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: