Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-62510

Indexing Failed after Cloud Backup Restoration in JIRA Server due to "shareType should not be null!"

XMLWordPrintable

      Description of Problem

      After restoring a Cloud backup to JIRA server, indexing failed with the following errors in atlassian-jira.log

      2016-08-19 21:18:10,996 JiraTaskExectionThread-3 WARN sysadmin 1277x313x1 v5jhvz 10.61.1.234 /secure/admin/jira/IndexReIndex.jspa [c.a.jira.index.AccumulatingResultB$
      java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: shareType should not be null!
              at com.atlassian.jira.index.FutureResult.await(FutureResult.java:29)
              at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:140)
              at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndex(DefaultSharedEntityIndexManager.java:128)
              at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndexAll(DefaultSharedEntityIndexManager.java:83)
              at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:64)
              at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:48)
              at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:25)
              at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:54)
              at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.call(ReIndexAsyncIndexerCommand.java:16)
              at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:24)
              at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:453)
              at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:421)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.util.concurrent.ExecutionException: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: shareType should not be null!
              at java.util.concurrent.FutureTask.report(FutureTask.java:122)
              at java.util.concurrent.FutureTask.get(FutureTask.java:192)
      ...
      2016-08-19 19:07:19,414 JiraImportTaskExecutionThread-1 ERROR sysadmin 1144x114x1 1mg9eth 10.60.2.234 /secure/admin/XmlRestor$
      com.atlassian.jira.index.IndexingFailureException: Indexing completed with 2 errors
              at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:150)
              at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndex(DefaultSharedEntityIndexManager.java:1$
              at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndexAll(DefaultSharedEntityIndexManager.jav$
              at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndexAll(DefaultSharedEntityIndexManager.jav$
              at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.activate(DefaultSharedEntityIndexManager.java:$
              at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.activate(DefaultSharedEntityIndexManager.java:$
              at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.activate(CompositeIndexLifecycleManager.java:134)
              at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.activate(CompositeIndexLifecycleManager.java:128)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.reindex(DefaultDataImportService.java:955)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:749)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:320)
              at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:60)
              at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28)
              at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:157)
              at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:133)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      
      
      

      Cause

      In Cloud versions, there is a new Share Type for filters for any logged in User. This value translates to "loggedin" in thesharepermissions table. Unfortunately, this value does not exist for JIRA Server, and it is interpreted as being null on the table.

      Expected Behavior

      Indexing does not fail after restore from JIRA Cloud.

      • One solution might be to fix this value during the XML restore process

      Workaround

      1. Stop JIRA
      2. Run this database query: update sharepermissions set sharetype = 'global' where sharetype = 'loggedin';
      3. Start JIRA
      4. Run a lock index to re-build the indexes.

              Unassigned Unassigned
              tevans Tim Evans (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: