Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-1718

Improve JCMA error for QueryException: Caught BatchUpdateException

XMLWordPrintable

    • 7
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Issue Summary

      JCMA may fail with the error:

      <time-stamp> ERROR <project-key> project-import We couldn't import Issue <issue-key>. Reason: QueryException: Caught BatchUpdateException for insert into "public"."jiraissue"

      The error is generic and does not specify the exact problem with the data.

       

      Steps to Reproduce Scenario 1 - Invalid Character

      1. Create a Jira issue with that contains an invalid character in the Summary (such as \u0000 character)

      Steps to Reproduce Scenario 2 - Invalid length

      1. Create a Jira issue with a length for Summary or Environment that exceeds 255 characters

      Expected Results

      The error should provide more details about the exact problem so that the user can correct the issue.

      Actual Results

      The migration fails with the error

      <time-stamp> ERROR <project-key> project-import We couldn't import Issue <issue-key>. Reason: QueryException: Caught BatchUpdateException for insert into "public"."jiraissue" ("created", "creator", "description", "description_adf", "effective_subtask_parent_id", "id", "issuenum", "priority", "project", "pkey", "reporter", "resolution", "resolutiondate", "soft_archived", "issuestatus", "summary", "issuetype", "updated", "votes", "watches", "workflow_id")
      values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?). This caused <N> other items to fail. 

      Workaround

      Review the workound steps here: JCMA migration error: 'We couldn't import issue <issue-key> Reason: QueryException: Caught BatchUpdateException for insert into "public"."jiraissue"'

      If the SQL query doesn't identify the issue for Scenario 1, try the following SQL for Scenario 2:

      -- Query written for Postgres
      SELECT * FROM jiraissue
      WHERE LENGTH(summary) > 254
      or LENGTH(environment) > 254;
      

      If the query also returns no results, please reach out to Atlassian Support.

              Unassigned Unassigned
              asalinasii@atlassian.com Alfonso S.
              Votes:
              32 Vote for this issue
              Watchers:
              16 Start watching this issue

                Created:
                Updated: