Issues with Workflows after Jira Cloud to Jira Server migration

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

As part of Jira Cloud to Jira Server migration, after importing the XML backup to Jira Server, the workflow will not be visible. Whenever tried to open the workflow, the below error message is seen on the UI screen.


The following error appears in the atlassian-jira.log

2020-06-11 11:28:26,567+0530 http-nio-8080-exec-3 ERROR XXXXXXX 688x1141x1 XXXXXXX 0:0:0:0:0:0:0:1 /rest/projectconfig/latest/workflowscheme/CE [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: java.lang.RuntimeException: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: The document type declaration for root element type "workflow" must end with '>'. (line:2 col:20)
com.atlassian.cache.CacheException: java.lang.RuntimeException: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: The document type declaration for root element type "workflow" must end with '>'. (line:2 col:20)
	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:212)
	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:163)
	at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore.getWorkflow(CachingWorkflowDescriptorStore.java:64)
	at com.atlassian.jira.workflow.JiraWorkflowFactory.getWorkflow(JiraWorkflowFactory.java:33)
	at com.opensymphony.workflow.config.DefaultConfiguration.getWorkflow(DefaultConfiguration.java:89)
	at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflow(OSWorkflowManager.java:189)
	at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflows(OSWorkflowManager.java:121)
	... 3 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
	at com.sun.proxy.$Proxy203.getWorkflows(Unknown Source)
	... 3 filtered
--------------------------------------------------------------------------
Caused by: java.lang.RuntimeException: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: The document type declaration for root element type "workflow" must end with '>'. (line:2 col:20)
	at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore.loadWorkflowDescriptor(CachingWorkflowDescriptorStore.java:110)
	at com.atlassian.cache.memory.MemoryCacheManager$2.load(MemoryCacheManager.java:192)
	at com.atlassian.cache.memory.DelegatingCache.lambda$get$0(DelegatingCache.java:163)
	at com.atlassian.cache.memory.DelegatingCache.lambda$get$1(DelegatingCache.java:191)
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4876)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4871)
	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:178)

Diagnosis

Diagnostic Steps

  • Check the contents of the DESCRIPTOR column in jiraworkflows table for 'The classic Jira defaultworkflow'
 select * from jiraworkflows;
  • In the jiraworkflows table, the DESCRIPTOR column contains the workflow details in XML format. For the Workflow Name: "classic default workflow" with ID: '10000', in the below line, "PUBLIC" keyword won't be seen.
<!DOCTYPE workflow "-//OpenSymphony Group//DTD OSWorkflow 2.8//EN" "http://www.opensymphony.com/osworkflow/workflow_2_8.dtd">
  • If you see the same column for other workflows, there will be a presence of PUBLIC keyword.
<!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.8//EN" "http://www.opensymphony.com/osworkflow/workflow_2_8.dtd">


Cause

At this time, we are not sure what is causing this issue. This issue is seen particularly when importing the backup XML from Jira Cloud into Jira Server instance.

Workaround

Option 1

One way to proceed with this issue would be to run an UPDATE command on the workflow entry for The classic JIRA default workflow where "PUBLIC" keyword is missing. However, we cannot verify if it has any long term effect.

          Please run this DB command against your target Jira instance's database.

update jiraworkflows set descriptor = replace(descriptor,'DOCTYPE workflow','DOCTYPE workflow PUBLIC') where id='10000' returning *;

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.

(warning) You need to restart your target Jira instance after performing the DB update.

Option 2

This error is observed very rarely. It is not seen in all Jira Cloud to Jira Server migration process. The safer option would be to get the backup XML from Jira cloud again and start the entire migration process from scratch. Chances are good that XML backup will take place without any errors this time. Please check if this is feasible for you. This would ensure there are no backend data updates as mentioned in the previous step.


DescriptionUnable to view workflow after Jira Cloud to Jira Server migration
ProductJira
Last modified on Jul 13, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.