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

Integrity Checker error when migrating from MySQL/PostgreSQL/Cloud to SQL Server

    XMLWordPrintable

Details

    Description

      Summary

      After migrating JIRA from MySQL/PostgreSQL/Cloud to SQL Server, the following error occurred when the Integrity Checker runs. In this example, JIRA has 2 workflow with the name 'purchases' and 'Purchases'.

      SELECT id,workflowname FROM jiraschema."jiraworkflows" where workflowname = 'purchases'
      
      id	workflowname
      10022	purchases
      12820	Purchases
      
      Technical details
      Log's referral number: b52389f3-69c3-4a3c-96da-89cc5c3f600f
      Cause
      Referer URL: http://jiratest/secure/admin/IntegrityChecker!default.jspa
      com.atlassian.jira.appconsistency.integrity.exception.IntegrityException: Error occurred while performing check.
      com.atlassian.jira.appconsistency.integrity.exception.IntegrityException: Error occurred while performing check.
      	at com.atlassian.jira.appconsistency.integrity.check.WorkflowCurrentStepCheck.doCheck(WorkflowCurrentStepCheck.java:167)
      	at com.atlassian.jira.appconsistency.integrity.check.WorkflowCurrentStepCheck.preview(WorkflowCurrentStepCheck.java:54)
      	at com.atlassian.jira.appconsistency.integrity.IntegrityChecker.preview(IntegrityChecker.java:63)
      	at com.atlassian.jira.appconsistency.integrity.IntegrityChecker.previewWithIds(IntegrityChecker.java:35)
      	at com.atlassian.jira.web.action.admin.IntegrityChecker.doExecute(IntegrityChecker.java:71)
      ...
      Caused by: com.atlassian.cache.CacheException: java.lang.IllegalStateException: There are more than one workflows associated with 'Purchases' in the database!
      	at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:270)
      	at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore.getWorkflow(CachingWorkflowDescriptorStore.java:68)
      	at com.atlassian.jira.workflow.JiraWorkflowFactory.getWorkflow(JiraWorkflowFactory.java:37)
      	at com.opensymphony.workflow.config.DefaultConfiguration.getWorkflow(DefaultConfiguration.java:89)
      	at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflow(OSWorkflowManager.java:202)
      	at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflow(OSWorkflowManager.java:548)
      	at com.atlassian.jira.appconsistency.integrity.check.WorkflowCurrentStepCheck.doCheck(WorkflowCurrentStepCheck.java:111)
      	... 188 more
      Caused by: java.lang.IllegalStateException: There are more than one workflows associated with 'Purchases' in the database!
      	at com.atlassian.jira.workflow.OfBizWorkflowDescriptorStore.getWorkflowDescriptorGV(OfBizWorkflowDescriptorStore.java:155)
      	at com.atlassian.jira.workflow.OfBizWorkflowDescriptorStore.getWorkflow(OfBizWorkflowDescriptorStore.java:46)
      	at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore$WorkflowCacheLoader.load(CachingWorkflowDescriptorStore.java:139)
      	at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore$WorkflowCacheLoader.load(CachingWorkflowDescriptorStore.java:132)
      ...
      

      Environment

      • JIRA on MS SQL Server
      • Recommended collation used - SQL_Latin1_General_CP437_CI_AI

      Steps to Reproduce

      1. Install JIRA with MySQL/PostgreSQL or grab a Cloud backup and skip to step 4
      2. Create two workflow with the following names. This will be 2 distinct workflows.
        • Purchases
        • purchases
      3. Create an XML backup
      4. Deploy a JIRA with SQL Server
      5. Restore XML backup
      6. Run Integrity Checker

      Notes

      1. MySQL is case sensitive so it reads the workflow as separate entity; however, SQL Server is case insensitive thus throwing the error
      2. Case sensitivity should be similar across all supported database for JIRA

      Workaround

      1. Shutdown JIRA
      2. Manually update the database to change one of the workflow name so you have a distinct name for each workflow
      3. Restart JIRA

      Attachments

        Activity

          People

            Unassigned Unassigned
            cchan Chung Park Chan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: