Error converting XML to workflow descriptor when Upgrading JIRA
Symptoms
The following appears in the atlassian-jira.log
:
2014-10-07 23:44:19,747 JiraImportTaskExecutionThread-1 ERROR admin 1420x366x1 n5g4ws 127.0.0.1 /secure/admin/XmlRestore.jspa [atlassian.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: java.lang.RuntimeException: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: Attribute "name" is required and must be specified for element type "action". (line:381 col:45)
com.atlassian.cache.CacheException: java.lang.RuntimeException: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: Attribute "name" is required and must be specified for element type "action". (line:381 col:45)
at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:67)
at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore.getWorkflow(CachingWorkflowDescriptorStore.java:67)
at com.atlassian.jira.workflow.JiraWorkflowFactory.getWorkflow(JiraWorkflowFactory.java:37)
at com.opensymphony.workflow.config.DefaultConfiguration.getWorkflow(DefaultConfiguration.java:89)
at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflow(OSWorkflowManager.java:197)
at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflows(OSWorkflowManager.java:116)
at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build6206.doUpgrade(UpgradeTask_Build6206.java:96)
at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSuccess(UpgradeManagerImpl.java:685)
at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:534)
at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:463)
.....
Caused by: java.lang.RuntimeException: com.opensymphony.workflow.FactoryException: Error converting XML to workflow descriptor.: root cause: Attribute "name" is required and must be specified for element type "action". (line:381 col:45)
at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore$WorkflowCacheLoader.load(CachingWorkflowDescriptorStore.java:142)
at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore$WorkflowCacheLoader.load(CachingWorkflowDescriptorStore.java:131)
at com.atlassian.cache.memory.MemoryCacheManager$3$1.apply(MemoryCacheManager.java:104)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:63)
... 23 more
Cause
Attribute "name" is required and must be specified for element type "action". Basically, in the workflow XML, all action id=""xxx"" must be followed by name=""
Resolution
- Get the XML backup and extract the contents
- Run the following to grep the lines that we want to check
grep "action id="\d*"" entities.xml > jira.txt
- Run another grep to list all that has no "name="
grep -v "name=" ./*.txt
Results would be something like
<action id="751" view="fieldscreen">
- Search for action id="751" in jira.txt file again to find the correct name value to fix the issue. For example
<action id="751" name="Open" view="fieldscreen">
- Open the entities.xml and update it as the above
- Compress them back to ZIP file and run the upgrade again
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.