The JIRA application statuses page throws a 500 Error

お困りですか?

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

コミュニティに質問

For Atlassian eyes only

This article is Not Validated and cannot be shared with customers.

症状

The following page appears when trying access to the Statuses page:










Or you can't see any workflow listed when navigating to workflows page.

With the following Error when expanded:

Technical details
Log's referral number: 0b8255e1-5025-4373-bbbb-744ded4b9177

Cause
Referer URL: http://10.60.5.147:8624/jira624/secure/admin/ViewStatuses.jspa
com.google.template.soy.tofu.SoyTofuException: In template JIRA.Templates.Statuses.success: In 'foreach' command {foreach $status in $statuses}{call .statusRow}{param status: $status /}{/call}{/foreach}, the data reference does not resolve to a SoyListData.
com.google.template.soy.tofu.SoyTofuException: In template JIRA.Templates.Statuses.success: In 'foreach' command {foreach $status in $statuses}{call .statusRow}{param status: $status /}{/call}{/foreach}, the data reference does not resolve to a SoyListData.
	at com.google.template.soy.tofu.internal.BaseTofu.renderMainHelper(BaseTofu.java:341)
	at com.google.template.soy.tofu.internal.BaseTofu.renderMain(BaseTofu.java:300)
	at com.google.template.soy.tofu.internal.BaseTofu.access$100(BaseTofu.java:56)
	at com.google.template.soy.tofu.internal.BaseTofu$RendererImpl.render(BaseTofu.java:427)

診断

Check in the atlassian-jira.log whether the following error is written:

Caused by: com.atlassian.cache.CacheException: java.lang.IllegalStateException: There are more than one draft workflows associated with the workflow named '<workflow name>'
	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:67)
	at com.atlassian.jira.workflow.CachingDraftWorkflowStore.getDraftWorkflow(CachingDraftWorkflowStore.java:55)
	at com.atlassian.jira.workflow.OSWorkflowManager.getDraftWorkflow(OSWorkflowManager.java:249)

または 

Caused by: com.atlassian.cache.CacheException: java.lang.IllegalStateException: There are more than one workflows associated with '<workflow name>' in the database!
	at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:270)
	at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore.getWorkflow(CachingWorkflowDescriptorStore.java:68)
	at com.atlassian.jira.workflow.JiraWorkflowFactory.getWorkflow(JiraWorkflowFactory.java:37)
	at com.opensymphony.workflow.config.DefaultConfiguration.getWorkflow(DefaultConfiguration.java:89)

または 

2016-04-07 15:35:49,564 http-nio-8711-exec-20 ERROR <username> 935x813x1 r6dcz1 172.18.66.246 /secure/admin/workflows/ListWorkflows.jspa [webwork.util.ValueStack] query="inactiveWorkflows" {[id="inactiveWorkflows" type="8" values=""]}
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 

原因

1) The JIRA application database has a duplicate record for a draft workflow. The problem is likely to occur when there are multiple Administrators who are creating workflow drafts of the same workflow at roughly the same time.

JRA-40009 - 課題詳細を取得中... ステータス

1.1) The Jira application has a corrupted draft workflow(only one). We cannot open the original workflow for editing.

2) The JIRA application database has a duplicate record for a workflow. 

3) There are orphaned scheme references (e.g. workflow, permission, notification) in the nodeassociation JIRA table referencing a deleted project. This produces a NullPointerException when the workflow list is populated. The following SQL query can be used to diagnose the problem:

Diagnosis: orphaned rows in the nodeassociation table
select * from nodeassociation where SOURCE_NODE_ENTITY='Project' AND SOURCE_NODE_ID not in (select ID from project);

4) Workflow contains duplicate actions

ソリューション 1

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

  1. Run the following SQL query on the database (to identify the drafts with more than one entry):

    SELECT count(*), parentname FROM jiradraftworkflows group by parentname having count(*) > 1;

    For the workflows(not draft), run the following query :

    SELECT count(*), workflowname FROM jiraworkflows group by workflowname having count(*) > 1;
  2. Delete one of the Id which have the same parentname.

    SELECT id, parentname from jiradraftworkflows;
    DELETE from jiradraftworkflows where id = <chosen_id_with_duplicated_parentname>;

    For the workflows(not draft), run the following query :

    SELECT id,workflowname FROM jiraworkflows;
    DELETE from jiraworkflows where id = <chosen_id_with_duplicated_workflowname>;
  3. Jira を再起動します。
  4. Run a re-index of your instance.

Resolution 1.1

Run the following SQL query on the database (to identify all the draft workflows):

select id,parentname from jiradraftworkflows ;

Try to open each of the workflows for editing and notice if you face any issue while opening any

If you face an error while opening a workflow for editing, you will need to follow these steps: 

  1. Shutdown JIRA (as the draft workflow XML could be cached in memory)
  2. 次の SQL を実行します。


-- Confirm the draft workflow ID being deleted (should return 1 and only 1 row)
SELECT id, parentname from jiradraftworkflows where id = <workflow_id_with_error>;

-- Run the delete
DELETE from jiradraftworkflows where id = <workflow_id_with_error>;

-- You should get 1 row affected

-- Check that the workflow is now gone (should return 0 rows)
SELECT id, parentname from jiradraftworkflows where id = <workflow_id_with_error>;

-- You may need to run COMMIT if your SQL editor does not do auto-commit
commit;
  1. Start JIRA and check that you can now click on JIRA Administration » Issues » Statuses without errors

ソリューション 2

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

  1. Run the following SQL query on the JIRA database to identify orphaned schemes associated to a deleted JIRA project. This query should return no results. If you do get any results, you are likely affected by this.

    Diagnosis: orphaned rows in the nodeassociation table
    select * from nodeassociation where SOURCE_NODE_ENTITY='Project' AND SOURCE_NODE_ID not in (select ID from project);
  2. Run the following query to delete these orphaned schemes for non-existent projects: 

    Remove orphaned rows in the nodeassociation table
    delete from nodeassociation where SOURCE_NODE_ENTITY='Project' AND SOURCE_NODE_ID not in (select ID from project);
  3. Jira を再起動します。
  4. Run a re-index of your instance.

ソリューション 3

Remove duplicated action in the workflow. Refer to Fixing Workflows with Duplicate occurance of action

ソリューション 4

Incase you are using script-runner plugin then issue can be resolved by executing below code in script runner console:

最終更新日 2021 年 6 月 28 日

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

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