NullPointerException when editing members of a Project Role

お困りですか?

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

コミュニティに質問

症状

Trying to edit members of a Project Role fails with an error similar to the following on the UI

An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. 
 
Details: ------- 
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUserPickerHtml' in class com.atlassian.jira.web.action.admin.roles.UserRoleActorAction threw exception java.lang.NullPointerException at com.atlassian.jira.plugin.system.projectroleactors:atlassian-user-role-actor-action//templates/plugins/jira/projectroles/user-role-actor.vm


Similar stacktrace appears in the atlassian-jira.log:

2013-10-21 10:42:49,123 http-8090-3 ERROR xxxx 38569x43478x1 14ywz09 /secure/project/UserRoleActorAction.jspa [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
java.lang.NullPointerException
	at com.opensymphony.user.User.getFullName(User.java:86)
	at com.atlassian.jira.security.roles.actor.UserRoleActorFactory$UserRoleActor.getDescriptor(UserRoleActorFactory.java:123)
	at com.atlassian.jira.security.roles.RoleActorComparator.compare(RoleActorComparator.java:37)

診断

Run the following SQL query against the JIRA database, if any results are returned then this KB is applicable:

select roletypeparameter from projectroleactor where roletype = 'atlassian-user-role-actor' and roletypeparameter not in (select user_key from app_user);

原因

A non-existent JIRA user is being referenced from the projectroleactor table of JIRA database ((info) The projectroleactor table stores the members of project roles in JIRA projects). This user may have previously existed, but may have been removed (probably via LDAP).  Note that the previous query may not find users who have been removed from the system by removing the directory they were associated with.  In this case the error will still occur and you will need to identify which users are associated with a project role and associated to a directory that no longer exists in the system.

回避策

  • Run the following SQL query to retrieve non-existent JIRA users who are still being refererred to in a Project Role.

    select roletypeparameter from projectroleactor where roletype = 'atlassian-user-role-actor' and roletypeparameter not in (select user_key from app_user);
  • Re-create the usernames returned from the query above in JIRA.

  • Remove this users from the Project Roles before deleting them from JIRA Again.

ソリューション

The issue is being tracked in  JRA-22622 - Getting issue details... STATUS

最終更新日 2016 年 6 月 6 日

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

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