-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 7.8.1, 8.20.5
-
Component/s: Administration - Workflows
-
7.08
-
12
-
Severity 2 - Major
-
0
Summary
When navigating to Administartion >> Issues >> Workflow, an error (The JIRA server was contacted but has returned an error response. We are unsure of the result of this operation) is displayed. This is due to a special character injected on the Workflow XML that made the XML of that Workflow broken. When Jira tries to parse that, it fails resulting in the error previously mentioned.
Environment
- Jira 7.8.1
Steps to Reproduce
- Inject special character on Workflow XML file (this could be accidental or malformed). This will cause the Workflow XML to be broken on the database.
- When trying to access to the Workflow administration page, this will result into an error (The JIRA server was contacted but has returned an error response. We are unsure of the result of this operation).
Expected Results
Jira will mention that the Workflow XML is broken due to special characters, or even if one XML is affected, this won't affect to the whole experience and page will still be displayed.
Actual Results
The below exception is thrown in the atlassian_jira.log file:
Caused by: java.lang.RuntimeException: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: Content is not allowed in prolog. (line:1 col:1) at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore.loadWorkflowDescriptor(CachingWorkflowDescriptorStore.java:110) at com.atlassian.cache.memory.MemoryCacheManager$3$1.load(MemoryCacheManager.java:211) at com.atlassian.cache.memory.DelegatingCache.lambda$get$0(DelegatingCache.java:168)
Note: The error does not mention the id of the workflow that is broken. Logging the id would also be helpful in determining the broken workflow.
And this error will be displayed on the UI:
Workaround
Manually check the workflow xml for all workflows in the database:
select descriptor from jiraworkflows;
Looking up the Workflows on the database, it will show that the XML is malformed. Here's a comparison with a different and well formed Workflow XML displayed in DBVisualizer:
Currently, the XML can be either analysed and fix by finding the special character, or to just delete the workflow after identifying which Workflow XML has been broken.
delete from jiraworkflows where id = <Broken_Workflow_XML_ID>;
This way, the broken XML won't be there anymore and Jira will only see well formed XML and will be able to display the Workflow Administration page.