Error converting XML to workflow descriptor when Upgrading JIRA

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

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

原因

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=""

ソリューション

  1. Get the XML backup and extract the contents
  2. Run the following to grep the lines that we want to check
    1. grep "action id="\d*"" entities.xml > jira.txt
  3. Run another grep to list all that has no "name="
    1. grep -v "name=" ./*.txt
      
    2. Results would be something like

      <action id="751" view="fieldscreen">
  4. Search for action id="751" in jira.txt file again to find the correct name value to fix the issue. For example
    1. <action id="751" name="Open" view="fieldscreen">
  5. Open the entities.xml and update it as the above
  6. Compress them back to ZIP file and run the upgrade again
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.