Invalid XML Character Causing Workflow Page not able to be viewed

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

Either the Workflows page is loaded, but doesn't show any workflows, or it cannot be opened at all, throwing large stack trace in the browser window. In either case, JIRA logs show a number of errors:

1 2 3 4 5 Caused by: org.xml.sax.SAXException: An invalid XML character (Unicode: 0xb) was found in the element content of the document. (line:39 col:25) at com.opensymphony.workflow.loader.WorkflowLoader$WorkflowErrorHandler.fatalError(WorkflowLoader.java:125) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
1 Caused by: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: An invalid XML character (Unicode: 0x13) was found in the element content of the document. (line:210 col:1)
1 Caused by: com.atlassian.cache.CacheException: java.lang.RuntimeException: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: An invalid XML character (Unicode: 0x13) was found in the element content of the document. (line:210 col:1)

Diagnosis

Verify that which workflow contains the invalid character for XML (0xb)

PostgreSQL query:

1 2 select id from jiraworkflows where descriptor ~ '[\x0B]';

MySQL query:

1 SELECT id FROM jiraworkflows WHERE descriptor LIKE CONCAT('%',X'0B','%');

Oracle query:

1 SELECT id FROM jiraworkflows WHERE (descriptor) LIKE '%' || UNISTR('\000B') || '%'

If no rows is returned, you are most likely not running into the similar error or replace the character with the one prompt on the error message. The regex equivalent for 0xb character is \x0B (0x13 equivalent to \x13).

ℹ️ The command above works for Postgres, for other database type, perform the alteration accordingly

Cause

Referring to the list of Valid characters in XML, having non valid characters will cause the XML not be able to parse correctly and therefore turning the error. And the workflow descriptor that JIRA uses is formatted in XML, so illegal character causes it to be throwing the error. The character can be input accidentally or imported from a malformed XML file.

Solution

Resolution

Replace the illegal character with nothing.

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

PostgreSQL query:

1 update jiraworkflows set descriptor = regexp_replace(descriptor,'[\x0B]','','g') where id = <id obtained from Diagnosis>;

MySQL query:

1 UPDATE jiraworkflows SET descriptor = REPLACE(descriptor, X'0B', '') WHERE id = <id obtained from Diagnosis>;

ℹ️ Replace the id obtained from the Diagnosis section above

For other database variant, please do the alteration accordingly

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.