Jira displays a blank page or the error java.lang.NullPointerException while accessing the Notifications Tab of Projects

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Symptoms

When administrators tries to access the notifications tab on the Project Administration page, a java.lang.NullPointerException is thrown.

The following appears in the atlassian-jira.log:

2012-10-12 22:09:04,732 http-8081-4 ERROR [500ErrorPage.jsp] Exception caught in 500 page null
java.lang.NullPointerException
	at com.atlassian.jira.projectconfig.contextproviders.ProjectNotificationContextProvider.getNotifications(ProjectNotificationContextProvider.java:189)
	at com.atlassian.jira.projectconfig.contextproviders.ProjectNotificationContextProvider.getContextMap(ProjectNotificationContextProvider.java:105)
	at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.initContextMap(CacheableContextProviderDecorator.java:70)
	...

The following may also be shown in newer versions of Jira (6.3.x):

2014-12-19 18:54:19,723 http-bio-8075-exec-24 WARN localadmin 1134x1825x1 1r6d7mr 127.0.0.1 /plugins/servlet/project-config/CSON/notifications [com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.

If you turn on DEBUG logging for the package com.atlassian.ozymandias, you will see the following additional lines:

2014-12-19 18:54:19,723 http-bio-8075-exec-24 DEBUG localadmin 1134x1825x1 1r6d7mr 127.0.0.1 /plugins/servlet/project-config/CSON/notifications [com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.
java.lang.NullPointerException
	at com.atlassian.jira.projectconfig.contextproviders.ProjectNotificationContextProvider.getNotifications(ProjectNotificationContextProvider.java:176)
	at com.atlassian.jira.projectconfig.contextproviders.ProjectNotificationContextProvider.getContextMap(ProjectNotificationContextProvider.java:102)
	at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.initContextMap(CacheableContextProviderDecorator.java:70)
	at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.getContextMap(CacheableContextProviderDecorator.java:46)
    ...

Note

The blank Notification Scheme page can also be occurring due to another root cause. If you are not able to find the errors mentioned above in the Jira logs, or if this article does not apply to your Jira application, you might want to consider this other KB article instead: Jira displays a blank page when viewing the Notifications page in Project Administration, or throws a NullPointerException when adding a new SMTP mail server

Cause

This error is caused by invalid entries for notifications (either groups or users) for the notification events in the notification scheme.

Resolution

  1. Go to the Notification Schemes in Jira Administration (⚙ > Issues > Notification Schemes).

  2. Click on the Notification link for the scheme associated with the project.
  3. Check if there are empty entries (with just a 'Delete' link next to it). 
    For example, on the below image, if there are empty users/groups on "Issue Resolved" and "Issue Closed" events.
  4. Remove these empty users/groups.
  5. Attempt to access the notification scheme of the problematic project.
  6. Go to Notification tab on Project (Administration > Project > Notification tab) to view the notification scheme, and see whether the problem is resolved.
    1. Perform a background re-index if empty users/groups/values are not presented


Last modified on Sep 12, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.