java.lang.NullPointerException

Atlassian JIRA | Eddie Kua [Atlassian] | 10 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    A scenario which we discovered from a user's support request: # Enable anonymous comment (Add "Anyone" to "Add Comment" and "Browse Project" permission) # Ensure that users are added into the "Administrators" role in the project role mapping, e.g. Users: Foo, Bar; Groups: jira-administrators # View issue without logging into JIRA and you will notice two things: ## NPE thrown and logged in the log file: {noformat} 2007-06-22 18:33:12,937 http-8090-Processor4 ERROR [webwork.util.ServletValueStack] METHOD: "createHtml", exception: java.lang.NullPointerException at com.atlassian.jira.security.roles.actor.UserRoleActorFactory$UserRoleActor.contains(UserRoleActorFactory.java:114) at com.atlassian.jira.security.roles.CachingProjectRoleAndActorStore$CachedDefaultRoleActors.contains(CachingProjectRoleAndActorStore.java:465) at com.atlassian.jira.security.roles.DefaultProjectRoleManager.getProjectRoles(DefaultProjectRoleManager.java:37) at com.atlassian.jira.issue.fields.CommentSystemField.getRoleLevels(CommentSystemField.java:515) at com.atlassian.jira.issue.fields.CommentSystemField.populateVelocityParams(CommentSystemField.java:407) at com.atlassian.jira.issue.fields.CommentSystemField.getCreateHtml(CommentSystemField.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) {noformat} ## Comment fields disappeared (although the "Add Comment" container is visible) This happens because both {{UserRoleActorFactory}} and {{GroupRoleActorFactory}} are added to the {{CachedDefaultRoleActors}} as its construction level.

    Atlassian JIRA | 10 years ago | Eddie Kua [Atlassian]
    java.lang.NullPointerException
  2. 0

    A scenario which we discovered from a user's support request: # Enable anonymous comment (Add "Anyone" to "Add Comment" and "Browse Project" permission) # Ensure that users are added into the "Administrators" role in the project role mapping, e.g. Users: Foo, Bar; Groups: jira-administrators # View issue without logging into JIRA and you will notice two things: ## NPE thrown and logged in the log file: {noformat} 2007-06-22 18:33:12,937 http-8090-Processor4 ERROR [webwork.util.ServletValueStack] METHOD: "createHtml", exception: java.lang.NullPointerException at com.atlassian.jira.security.roles.actor.UserRoleActorFactory$UserRoleActor.contains(UserRoleActorFactory.java:114) at com.atlassian.jira.security.roles.CachingProjectRoleAndActorStore$CachedDefaultRoleActors.contains(CachingProjectRoleAndActorStore.java:465) at com.atlassian.jira.security.roles.DefaultProjectRoleManager.getProjectRoles(DefaultProjectRoleManager.java:37) at com.atlassian.jira.issue.fields.CommentSystemField.getRoleLevels(CommentSystemField.java:515) at com.atlassian.jira.issue.fields.CommentSystemField.populateVelocityParams(CommentSystemField.java:407) at com.atlassian.jira.issue.fields.CommentSystemField.getCreateHtml(CommentSystemField.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) {noformat} ## Comment fields disappeared (although the "Add Comment" container is visible) This happens because both {{UserRoleActorFactory}} and {{GroupRoleActorFactory}} are added to the {{CachedDefaultRoleActors}} as its construction level.

    Atlassian JIRA | 10 years ago | Eddie Kua [Atlassian]
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.jira.security.roles.actor.UserRoleActorFactory$UserRoleActor.contains()
    2. com.atlassian.jira
      CommentSystemField.getCreateHtml
      1. com.atlassian.jira.security.roles.actor.UserRoleActorFactory$UserRoleActor.contains(UserRoleActorFactory.java:114)
      2. com.atlassian.jira.security.roles.CachingProjectRoleAndActorStore$CachedDefaultRoleActors.contains(CachingProjectRoleAndActorStore.java:465)
      3. com.atlassian.jira.security.roles.DefaultProjectRoleManager.getProjectRoles(DefaultProjectRoleManager.java:37)
      4. com.atlassian.jira.issue.fields.CommentSystemField.getRoleLevels(CommentSystemField.java:515)
      5. com.atlassian.jira.issue.fields.CommentSystemField.populateVelocityParams(CommentSystemField.java:407)
      6. com.atlassian.jira.issue.fields.CommentSystemField.getCreateHtml(CommentSystemField.java:108)
      6 frames
    3. Java RT
      NativeMethodAccessorImpl.invoke0
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      1 frame