NullPointerException when trying to access System Dashboard
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
Symptoms
When trying to access the main dashboard, a System Error is thrown and one of the following errors appears in atlassian-jira.log
:
Jira 8 and newer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2024-04-19 04:41:36,376+0000 http-nio-8080-exec-7 ERROR [o.a.c.c.C.[.[localhost].[/jira].[action]] Servlet.service() for servlet [action] in context with path [/jira] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at com.atlassian.jira.web.action.Dashboard.initialiseCurrentDashboardId(Dashboard.java:562)
at com.atlassian.jira.web.action.Dashboard.getCurrentDashboardId(Dashboard.java:267)
at com.atlassian.jira.web.action.Dashboard.getCurrentDashboardState(Dashboard.java:280)
at com.atlassian.jira.web.action.Dashboard.doValidation(Dashboard.java:165)
at webwork.action.ActionSupport.validate(ActionSupport.java:391)
... 1 filtered
at com.atlassian.jira.web.action.JiraWebActionSupport.execute(JiraWebActionSupport.java:1364)
... 7 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
... 48 filtered
at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:56)
... 7 filtered
Jira 7 and earlier
1
2
3
4
5
6
7
8
ERROR EIL018 948x15658x1 admin 172.30.248.33 /secure/Dashboard.jspa [atlassian.plugin.web.DefaultWebInterfaceManager] Could not evaluate condition 'com.atlassian.plugin.web.conditions.AndCompositeCondition@47d94f' for descriptor: jira.top.navigation.bar:gadgets.dashboard.menu.share (null)
java.lang.NullPointerException
at com.atlassian.jira.plugin.webfragment.conditions.ShowDashboardToolsMenuCondition.shouldDisplay(ShowDashboardToolsMenuCondition.java:41)
at com.atlassian.plugin.web.conditions.AndCompositeCondition.shouldDisplay(AndCompositeCondition.java:14)
at com.atlassian.plugin.web.DefaultWebInterfaceManager.filterFragmentsByCondition(DefaultWebInterfaceManager.java:172)
at com.atlassian.plugin.web.DefaultWebInterfaceManager.getDisplayableItems(DefaultWebInterfaceManager.java:103)
at sun.reflect.GeneratedMethodAccessor372.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Diagnosis
Run the following SQL query:
1
SELECT * FROM portalpage WHERE username IS NULL;
If no results are returned, your Jira instance is affected by this problem.
Cause
The default System Dashboard has been associated with a user account, when it should be associated to nobody (null).
This causes Jira to be unable to find the default dashboard when other users (including users who haven't yet logged in) try to access it, resulting in a NullPointerException error.
Solution
Run the following SQL query:
1
SELECT id FROM portalpage WHERE username IS NOT NULL AND pagename = 'System Dashboard';
The above query should return only one row, containing an ID number. If it returns no rows, or more than one row, please do not proceed any further and instead contact Atlassian Support.
Perform a Backing Up Data, for roll-back purposes, if necessary.
Shut down Jira.
Run the SQL query below, replacing <portalpageid> with the ID number returned in step 1:
1
UPDATE portalpage SET username = NULL WHERE id = '<portalpageid>'
ℹ️The query above will set the owner of the default dashboard to nobody, so users who have logged in can see it.
Start Jira.
Was this helpful?