java.lang.NullPointerException

Atlassian JIRA | Michael Tokar | 7 years ago
  1. 0

    h4. Symptoms Stack trace (from 500 page): {quote} 2010-02-03 17:12:19,980 http-8080-Processor23 [webwork.dispatcher.ServletDispatcher] Could not execute action java.lang.NullPointerException at com.atlassian.jira.scheme.mapper.SchemeTransformResult.addRoleMappingForGroup(SchemeTransformResult.java:126) at com.atlassian.jira.scheme.mapper.SchemeGroupsToRolesTransformerImpl.transformScheme(SchemeGroupsToRolesTransformerImpl.java:172) at com.atlassian.jira.scheme.mapper.SchemeGroupsToRolesTransformerImpl.doTransform(SchemeGroupsToRolesTransformerImpl.java:48) at com.atlassian.jira.bc.scheme.mapper.DefaultSchemeGroupsToRoleTransformerService.doTransform(DefaultSchemeGroupsToRoleTransformerService.java:41) at com.atlassian.jira.web.action.admin.scheme.mapper.SchemeGroupToRoleTransformerAction.doDefault(SchemeGroupToRoleTransformerAction.java:50) {quote} h4. Steps to reproduce # Create a group *testgroup* # Add group to an event in *Default Notification Scheme* # Delete group *testgroup* # Go to _Administration > Scheme Tools > Group to Project Role Mapping Tool_ # From the dropdown select *notification scheme* and then from the list select *Default Notification Scheme* and then click _Map Groups to Roles_ # Next to the group *testgroup* select the dropdown *Users* and click _Preview Mappings_ # 500 page with exception is shown I guess this is a bug in two ways: * NullPointerException shouldn't be thrown. There should be some way of mapping out the non-existent group to a project role. * *But more importantly,* when you delete a group, it should delete associated scheme entities We should at least have a check for this in the Integrity Checker? h4. Workaround As a workaround for this bug, we can remove the groups that no longer exists from the Notification schemes and Permission Schemes. We can find what schemes have non-existant groups by running the following queries on your database *Notification Schemes:* {code:SQL} select NS.name,N.notif_parameter from notification N join notificationscheme NS on N.scheme=NS.id where N.notif_type = 'Group_Dropdown' and N.notif_parameter not in (select group_name from cwd_group) group by NS.name,N.notif_parameter {code} *Permission Schemes:* {code:SQL} select PS.name,P.perm_parameter from schemepermissions P join permissionscheme PS on P.scheme=PS.id where P.perm_type = 'group' and P.perm_parameter not in (select group_name from cwd_group) group by PS.name,P.perm_parameter {code} Navigate on JIRA to the Notification/Permission scheme returned by the query and remove the groups specified by the queries.

    Atlassian JIRA | 7 years ago | Michael Tokar
    java.lang.NullPointerException
  2. 0

    h4. Symptoms Stack trace (from 500 page): {quote} 2010-02-03 17:12:19,980 http-8080-Processor23 [webwork.dispatcher.ServletDispatcher] Could not execute action java.lang.NullPointerException at com.atlassian.jira.scheme.mapper.SchemeTransformResult.addRoleMappingForGroup(SchemeTransformResult.java:126) at com.atlassian.jira.scheme.mapper.SchemeGroupsToRolesTransformerImpl.transformScheme(SchemeGroupsToRolesTransformerImpl.java:172) at com.atlassian.jira.scheme.mapper.SchemeGroupsToRolesTransformerImpl.doTransform(SchemeGroupsToRolesTransformerImpl.java:48) at com.atlassian.jira.bc.scheme.mapper.DefaultSchemeGroupsToRoleTransformerService.doTransform(DefaultSchemeGroupsToRoleTransformerService.java:41) at com.atlassian.jira.web.action.admin.scheme.mapper.SchemeGroupToRoleTransformerAction.doDefault(SchemeGroupToRoleTransformerAction.java:50) {quote} h4. Steps to reproduce # Create a group *testgroup* # Add group to an event in *Default Notification Scheme* # Delete group *testgroup* # Go to _Administration > Scheme Tools > Group to Project Role Mapping Tool_ # From the dropdown select *notification scheme* and then from the list select *Default Notification Scheme* and then click _Map Groups to Roles_ # Next to the group *testgroup* select the dropdown *Users* and click _Preview Mappings_ # 500 page with exception is shown I guess this is a bug in two ways: * NullPointerException shouldn't be thrown. There should be some way of mapping out the non-existent group to a project role. * *But more importantly,* when you delete a group, it should delete associated scheme entities We should at least have a check for this in the Integrity Checker? h4. Workaround As a workaround for this bug, we can remove the groups that no longer exists from the Notification schemes and Permission Schemes. We can find what schemes have non-existant groups by running the following queries on your database *Notification Schemes:* {code:SQL} select NS.name,N.notif_parameter from notification N join notificationscheme NS on N.scheme=NS.id where N.notif_type = 'Group_Dropdown' and N.notif_parameter not in (select group_name from cwd_group) group by NS.name,N.notif_parameter {code} *Permission Schemes:* {code:SQL} select PS.name,P.perm_parameter from schemepermissions P join permissionscheme PS on P.scheme=PS.id where P.perm_type = 'group' and P.perm_parameter not in (select group_name from cwd_group) group by PS.name,P.perm_parameter {code} Navigate on JIRA to the Notification/Permission scheme returned by the query and remove the groups specified by the queries.

    Atlassian JIRA | 7 years ago | Michael Tokar
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.jira.scheme.mapper.SchemeTransformResult.addRoleMappingForGroup()
    2. com.atlassian.jira
      SchemeGroupToRoleTransformerAction.doDefault
      1. com.atlassian.jira.scheme.mapper.SchemeTransformResult.addRoleMappingForGroup(SchemeTransformResult.java:126)
      2. com.atlassian.jira.scheme.mapper.SchemeGroupsToRolesTransformerImpl.transformScheme(SchemeGroupsToRolesTransformerImpl.java:172)
      3. com.atlassian.jira.scheme.mapper.SchemeGroupsToRolesTransformerImpl.doTransform(SchemeGroupsToRolesTransformerImpl.java:48)
      4. com.atlassian.jira.bc.scheme.mapper.DefaultSchemeGroupsToRoleTransformerService.doTransform(DefaultSchemeGroupsToRoleTransformerService.java:41)
      5. com.atlassian.jira.web.action.admin.scheme.mapper.SchemeGroupToRoleTransformerAction.doDefault(SchemeGroupToRoleTransformerAction.java:50)
      5 frames