Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-337

JIRA Stops working after Disabling or Uninstalling JIRA Service Desk

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: High High
    • None
    • 1.2.0.2
    • None

      NOTE: This bug report is for JIRA Service Desk Server. Using JIRA Service Desk Cloud? See the corresponding bug report.

      Steps to Reproduce:

      1. Install JIRA Service Desk;
      2. Create a Project through JIRA Service Desk;
      3. Disable or Uninstall JIRA Service Desk.

      Expected Behavior:

      JIRA would hide/remove any configuration regarding JIRA Service Desk, and would continue to run normally.

      Actual Behavior:

      • JIRA's dashboards stop working;
      • It is not possible to log in but through login.jsp;
      • Accessing a project is not possible;
      • Trying to view the Permission tab through the project created throws an error.

      Workaround

      Option 1: Reinstall/Re-enable JIRA Service Desk.

      Option 2:

      1. If unable to log in, access JIRA through http://<jira-address>/login.jsp
      2. Navigate to Administration » Issues » Permission Scheme;
      3. Delete "• (Anyone)" from all permissions in all permission schemes.

      Option 3:
      Delete these from the database using:

      DELETE FROM schemepermissions WHERE perm_type = 'sd.customer.portal.only';
      

      If deleting through the database, please make sure to create a backup. Also, make sure to shutdown JIRA first, and restart it afterwards.


      Notes:

      This seems to be happening because JIRA Service Desk does not remove or hide the Service Desk Customer - Portal Access (Anyone) permission, and when JIRA tries to load it the following is thrown in the screen:

      java.lang.NullPointerException
      	at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemePermission(DefaultPermissionSchemeManager.java:499)
      	at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasPermission(DefaultPermissionSchemeManager.java:467)
      	at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemeAuthority(DefaultPermissionSchemeManager.java:393)
      

      This also appears in the logs:

      2014-02-14 14:37:39,773 http-bio-8080-exec-1 ERROR matheus 877x158x5 1fqd1vy 192.168.10.104 /rest/gadget/1.0/issueTable/jql [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
      java.lang.NullPointerException
              at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.collectProjectTerms(DefaultPermissionQueryFactory.java:171)
              at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.getQuery(DefaultPermissionQueryFactory.java:68)
              at com.atlassian.jira.issue.search.parameters.lucene.PermissionsFilterGeneratorImpl.getQuery(PermissionsFilterGeneratorImpl.java:38)
              at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getPermissionsFilter(LuceneSearchProvider.java:522)
              at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHits(LuceneSearchProvider.java:281)
              at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:414)
      

          Form Name

            [JSDSERVER-337] JIRA Stops working after Disabling or Uninstalling JIRA Service Desk

            Dave C added a comment -

            matt.doar on install Service Desk inserts records into the schemepermissions table. When the plugin is installed, that's OK, however when it isn't JIRA has no idea what those records are for and throws the exception in this bug.

            I'm not entirely sure on the actual coding changes in JIRA to handle this, other than knowing the bug was fixed.

            Dave C added a comment - matt.doar on install Service Desk inserts records into the schemepermissions table. When the plugin is installed, that's OK, however when it isn't JIRA has no idea what those records are for and throws the exception in this bug. I'm not entirely sure on the actual coding changes in JIRA to handle this, other than knowing the bug was fixed.

            MattS added a comment -

            David, when you say "manually" you must be referring to something Service Desk does on install right? Was the fix for JIRA to ignore the new permissions somehow?

            MattS added a comment - David, when you say "manually" you must be referring to something Service Desk does on install right? Was the fix for JIRA to ignore the new permissions somehow?

            Dave C added a comment - - edited

            This is a duplicate of JRA-36940, which is fixed in JIRA 6.2. It is caused by JIRA Service Desk adding entries to the schemepermissions table in order to provide specific permissions. When the plugin is uninstalled this causes problem with JIRA as it does not know what those permissions related to.

            This is fixed in JIRA 6.2 as it ignores the permissions in the table.

            Dave C added a comment - - edited This is a duplicate of JRA-36940 , which is fixed in JIRA 6.2. It is caused by JIRA Service Desk adding entries to the schemepermissions table in order to provide specific permissions. When the plugin is uninstalled this causes problem with JIRA as it does not know what those permissions related to. This is fixed in JIRA 6.2 as it ignores the permissions in the table.

            MattS added a comment -

            Wow, this one is a doozy! Hard to automate a test for I can imagine. There's all sorts of other data and configuration changes that get left behind if you uninstall SD. I've had to go through and remove schemes, configurations, fields. Not pretty

            MattS added a comment - Wow, this one is a doozy! Hard to automate a test for I can imagine. There's all sorts of other data and configuration changes that get left behind if you uninstall SD. I've had to go through and remove schemes, configurations, fields. Not pretty

              Unassigned Unassigned
              mfernandes@atlassian.com Matheus Fernandes
              Affected customers:
              2 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: