java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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.
    via by Michael Tokar,
  • 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.
    via by Michael Tokar,
    • 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)
    No Bugmate found.