Error When Viewing or Exporting a Filter

Still need help?

The Atlassian Community is here for you.

Ask the community

 

Problem

When viewing a filter, the search bar is missing and users are unable to perform an export:

Attempting to edit the filter permissions, we see:

  • Note that there are no options to remove the problematic group from the filter

The following appears in the atlassian-jira.log

2017-03-15 15:03:34,017 http-nio-8081-exec-10 ERROR admin 903x52x2 y7yora 0:0:0:0:0:0:0:1 /rest/api/2/filter/10200 [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response
java.lang.reflect.InvocationTargetException
        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:498)
        at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
        ... 4 filtered
		...
Caused by: java.lang.NullPointerException
        at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroup(DefaultGroupManager.java:192)
        at com.atlassian.jira.security.groups.RequestCachingGroupManager.getUsersInGroup(RequestCachingGroupManager.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
        at com.sun.proxy.$Proxy278.getUsersInGroup(Unknown Source)
        ... 3 filtered

Cause

The filter is referencing a group that does not exist.

Resolution

  1. We'll want to identify all filter shares to groups that do not exist. To do this, run the following SQL query:
    1. SELECT sr.id,sr.filtername,sr.authorname,sp.param1 as problem_group FROM searchrequest sr JOIN sharepermissions sp ON sr.id=sp.entityid WHERE sp.sharetype='group' AND sp.param1 NOT IN (SELECT lower_group_name FROM cwd_group);
    2. This will return results showing the filter id, filter name, filter owner, and the problematic group that is refereced
  2. Once we have the group list, we'll want to use JIRA's interface to clean up the missing references:
    1. re-create the problematic group with the exact same name as what we found above
    2. delete the group again via JIRA's UI, this should clean up all the references for that group

 

Last modified on Mar 15, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.