Jira server displays a blank page when viewing Notifications page in Project Administration, or throws a NullPointerException when adding a new mail server

お困りですか?

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

コミュニティに質問

問題

While viewing the Project Administration page for a project, clicking on the Notifications link in the left navigation pane results in a blank page being displayed. In addition, when viewing the Notifications Schemes administration page, the schemes are displayed but no projects are listed as assigned.

The following errors appear in the atlassian-jira.log when viewing the Notifications page or the Notification schemes administration page.

WARN sysadmin 683x85556x1 nwx0h8 /plugins/servlet/project-config/WP/notifications [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.
 
ERROR sysadmin 683x85697x1 nwx0h8 /secure/admin/ViewNotificationSchemes.jspa [webwork.util.ValueStack] METHOD: "projects", exception:
2015-09-22 11:23:49.796737500 java.lang.NullPointerException
2015-09-22 11:23:49.796738500 at com.atlassian.jira.util.Named$1.compare(Named.java:21)
2015-09-22 11:23:49.796738500 at com.atlassian.jira.util.Named$1.compare(Named.java:18)

 

Alternatively, the following error might show up in atlassian-jira.log while adding a new Mail Server.

java.lang.NullPointerException

    java.lang.NullPointerException
    	at com.atlassian.jira.plugins.mail.webwork.AddSmtpMailServer$1.compare(AddSmtpMailServer.java:46)
    	at com.atlassian.jira.plugins.mail.webwork.AddSmtpMailServer$1.compare(AddSmtpMailServer.java:42)
    	at java.util.TreeMap.put(TreeMap.java:552)
    	at java.util.TreeSet.add(TreeSet.java:255)
    	at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
    	at java.util.TreeSet.addAll(TreeSet.java:312)
    	at com.atlassian.jira.plugins.mail.webwork.AddSmtpMailServer.doDefault(AddSmtpMailServer.java:52)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
    	at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
 

診断

Run the following SQL statement against the JIRA database to check for the presence of project schemes that lack a project source node association.

select * from nodeAssociation where association_type = 'ProjectScheme' and not exists (select 'x' from project where project.id = source_node_id);

If the query above returns results as below, the issue this article describes is present.

 source_node_id | source_node_entity | sink_node_id |   sink_node_entity    | association_type | sequence
----------------+--------------------+--------------+-----------------------+------------------+----------
          15202 | Project            |            1 | IssueTypeScreenScheme | ProjectScheme    |
          15202 | Project            |        10000 | NotificationScheme    | ProjectScheme    |
          15202 | Project            |            0 | PermissionScheme      | ProjectScheme    |

原因

Project database information is corrupt. Could have happened by the incorrect removal of a project caused by an error or broken transaction while calling the method 

com.atlassian.jira.project.DefaultProjectManager.removeProject

ソリューション

(warning) Backup your JIRA database before proceeding!

If the SQL select statement produces results, run the following delete statement to remove the invalid entries.

delete from nodeAssociation where association_type = 'ProjectScheme' and not exists (select 'x' from project where project.id = source_node_id);

The Notifications page and Notification Schemes page should now display the notifications and project associations as expected.

最終更新日 2019 年 9 月 25 日

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

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