Opening of JIRA Issue Navigator Fails with Exception 500

お困りですか?

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

コミュニティに質問

問題

This problem has several different symptoms. Browsing JIRA shows 500 errors while accessing the following pages:

  • JIRA issues;
  • the JIRA Issue Navigator page, or;
  • clicking on a label on issues (which also redirects you to the issue navigator).

Also, when viewing the Workflow page in the JIRA Administration, no workflows are displayed. See below for a list of symptoms on the screen and on the logs:

500 Error Page on Issues:

ここをクリックして展開...

When accessing JIRA issues, the 500 error page will appear stating that a NullPointerException error had occurred.

And the following exception can be observed from the atlassian-jira.log log file:

2013-06-20 15:28:56,335 http-bio-8082-exec-5 ERROR      [500ErrorPage.jsp] Exception caught in 500 page null
java.lang.NullPointerException
	at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:90)
	at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:30)
	at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:75)
	at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:113)
	at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:142)  <+3> (NativeMethodAccessorImpl.java:39) (DelegatingMethodAccessorImpl.java:25)
[.....]

 

500 Error Page for JIRA Issue Navigator

ここをクリックして展開...

Similarly, when accessing the Issue Navigator the problem also occurs:

And we can observe the following exceptions in the atlassian-jira.log log file:

2013-06-20 15:35:06,557 http-bio-8082-exec-3 ERROR badmin 935x186x1 1o8ycet 0:0:0:0:0:0:0:1 /issues/ [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
java.lang.NullPointerException
	at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:90)
	at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:30)
	at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:75)
[.....]
2013-06-20 15:35:06,828 http-bio-8082-exec-3 ERROR      [500ErrorPage.jsp] Exception caught in 500 page null
java.lang.NullPointerException
	at com.atlassian.jira.workflow.DefaultWorkflowSchemeManager$ActiveWorkflowCache.load(DefaultWorkflowSchemeManager.java:814)
	at com.atlassian.jira.workflow.DefaultWorkflowSchemeManager$ActiveWorkflowCache.get(DefaultWorkflowSchemeManager.java:744)
	at com.atlassian.jira.workflow.DefaultWorkflowSchemeManager.getActiveWorkflowNames(DefaultWorkflowSchemeManager.java:452)


Clicking on labels (which redirects you to the issue navigator)

ここをクリックして展開...

This problem can also surface when clicking on labels. The following stack trace is shown along with the 500-error page:

java.lang.NullPointerException
Hide stack trace
    java.lang.NullPointerException
    	at com.atlassian.jira.issue.search.searchers.renderer.StatusSearchRenderer.getSelectListOptions(StatusSearchRenderer.java:61)
    	at com.atlassian.jira.issue.search.searchers.renderer.IssueConstantsSearchRenderer.getEditHtml(IssueConstantsSearchRenderer.java:54)
    	at com.atlassian.jira.plugin.issuenav.service.DefaultSearcherService.getEditHtml(DefaultSearcherService.java:483)
    	at com.atlassian.jira.plugin.issuenav.service.DefaultSearcherService.getValueResults(DefaultSearcherService.java:255)
    	at com.atlassian.jira.plugin.issuenav.service.DefaultSearcherService.getSearchResults(DefaultSearcherService.java:176)
    	at com.atlassian.jira.plugin.issuenav.service.DefaultSearcherService.searchWithJql(DefaultSearcherService.java:170)
    	at com.atlassian.jira.plugin.issuenav.IssueNavAction.performSearch(IssueNavAction.java:1169)
    	at com.atlassian.jira.plugin.issuenav.IssueNavAction.doNav(IssueNavAction.java:360)

 

Viewing the Workflow page in the Administration:

ここをクリックして展開...

No workflows are displayed:

and in the atlassian-jira.log:

2015-03-24 16:55:13,270 http-bio-8080-exec-3 ERROR matheus 1015x115x1 nwms6n 0:0:0:0:0:0:0:1 /secure/admin/workflows/ListWorkflows.jspa [webwork.util.ValueStack] query="activeWorkflows" {[id="activeWorkflows" type="8" values=""]}
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
...
Caused by: com.atlassian.cache.CacheException: java.lang.NullPointerException
    at com.atlassian.cache.memory.DelegatingCachedReference.get(DelegatingCachedReference.java:60)
...
Caused by: java.lang.NullPointerException
    at com.atlassian.jira.workflow.DefaultWorkflowSchemeManager$WorkflowSupplier.get(DefaultWorkflowSchemeManager.java:1306)
...

診断

To verify if you are being affected by this problem, please perform the following SQL query in JIRA's database accordingly:

PostgreSQL and Oracle

SELECT id, workflow FROM workflowschemeentity WHERE workflow NOT IN (SELECT workflowname FROM jiraworkflows);

 

 MS-SQL database

SELECT id, workflow FROM workflowschemeentity WHERE workflow collate SQL_Latin1_General_CP437_CS_AS NOT IN (SELECT workflowname FROM jiraworkflows);

 

MySQL database

SELECT id, workflow FROM workflowschemeentity WHERE BINARY workflow NOT IN (SELECT workflowname FROM jiraworkflows);

原因

This issue can happen if one or more workflow names stored in the workflowschemeentity table do not match any workflow names stored in the jiraworkflows table. One reason for this could be a Workflow Scheme that is associated with a deleted Workflow in the database, or there is an inconsistency in the characters' cases of the workflow name (e.g. "JIRA workflow" vs "JIRA Workflow").

The 'jira' workflow is a Read-only System Workflow so it is not in the 'jiraworkflows' table. If running the Diagnosis queries returns that workflow, then it is normal.

ソリューション

データベースの変更を行う場合は 必ず事前にバックアップを取得してください。可能な場合はテスト サーバーで変更を試すことをおすすめします。

  1. Jira をシャットダウンします。

  2. After identifying the inconsistent workflow in the workflowschemeentity table, please update the entry/entries with the valid workflow name by running the following SQL update statement:

    UPDATE workflowschemeentity SET workflow = '<Correct Workflow Name>' where id=<ID of incorrectly named workflow>;

    (info) Remember to change the Workflow Name and ID to the correct value accordingly.

  3. (Oracle Only): Commit the transaction with the following:

    COMMIT;
  4. After updating the related record(s) in the database, restart JIRA for the changes to take effect.

Last modified on Mar 17, 2014

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

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