Troubleshooting Jira Server 500 Errors
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
Problem
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:
1
2
3
4
5
6
7
8
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:
1
2
3
4
5
6
7
8
9
10
11
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:
1
2
3
4
5
6
7
8
9
10
11
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
:
1
2
3
4
5
6
7
8
9
10
11
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)
...
Diagnosis
To verify if you are being affected by this problem, please perform the following SQL query in JIRA's database accordingly:
PostgreSQL and Oracle
1
SELECT id, workflow FROM workflowschemeentity WHERE workflow NOT IN (SELECT workflowname FROM jiraworkflows);
MS-SQL database
1
SELECT id, workflow FROM workflowschemeentity WHERE workflow collate SQL_Latin1_General_CP437_CS_AS NOT IN (SELECT workflowname FROM jiraworkflows);
MySQL database
1
SELECT id, workflow FROM workflowschemeentity WHERE BINARY workflow NOT IN (SELECT workflowname FROM jiraworkflows);
Check if workflow is deleted or renamed
If a workflow is deleted then we can check following queries. We might get no records in JIRAWORKFLOWS
table for that workflow. In such scenario we can also run UPDATE
query as in Resolution section with any of the available workflow in JIRAWORKFLOWS
table. For example we can try to update workflowschemeentity
with workflow available in JIRAWORKFLOWS, testworkflow in this example.
This would help to resolve java.lang.NullPointerException exception. Later once dashboard is visible again, these changes should be validated from "Workflows"
and "Workflow schemes"
pages in Jira UI (Administration → Issues).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SELECT * from workflowschemeentity WHERE WORKFLOW NOT in (select workflowname from jiraworkflows) AND WORKFLOW != 'jira';
ID |SCHEME|WORKFLOW |ISSUETYPE|
-----+------+---------+---------+
25339| 22454|Workflow4| 10201|
25364| 22462|Workflow4| 10201|
SELECT count(1) FROM JIRAWORKFLOWS j WHERE WORKFLOWNAME = 'Workflow4' ;
COUNT(1)|
--------+
0|
# check for any other workflow which is available in JIRAWORKFLOWS table.
SELECT count(1) FROM JIRAWORKFLOWS j WHERE WORKFLOWNAME = 'testworkflow' ;
COUNT(1)|
--------+
1|
UPDATE workflowschemeentity SET workflow = 'testworkflow' where id=25339;
UPDATE workflowschemeentity SET workflow = 'testworkflow' where id=25364;
Cause
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.
Solution
Resolution
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Shutdown JIRA.
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: This valid workflow name can be any workflow name that exists in the jiraworkflows table.1
UPDATE workflowschemeentity SET workflow = '<Correct Workflow Name>' where id=<ID of incorrectly named workflow>;
ℹ️ Remember to change the
Workflow Name
and ID to the correct value accordingly.(Oracle Only): Commit the transaction with the following:
1
COMMIT;
After updating the related record(s) in the database, restart JIRA for the changes to take effect.
Was this helpful?