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

JCMA export throws java.lang.NullPointerException when trying to get the SLA customfield value

    XMLWordPrintable

Details

    • 3
    • Severity 2 - Major
    • 12

    Description

      Issue Summary

      JCMA export throws java.lang.NullPointerException when trying to get the corrupted SLA customfield value of an issue.The following stacktrace shows that we are trying get the SLA customfield value.

          at com.atlassian.jira.migration.export.core.customfield.jsd.JsdCustomFieldValueParser.defineSlaCustomFieldValue(JsdCustomFieldValueParser.kt:128)
          at com.atlassian.jira.migration.export.core.customfield.jsd.JsdCustomFieldValueParser.deriveCustomFieldValue(JsdCustomFieldValueParser.kt:93)  

      This is reproducible on Data Center: Yes (with DB tweak)

      Steps to Reproduce

      • Create a new JSM Project.
      • Configure an SLA for this project.
      • Check the customfieldvalue related to one of the Jira issues.
        SELECT * from customfieldvalue where issue in (select id from jiraissue where issuenum=<issue_number>and project=<project_id>) 
      • Tweak the customfieldvalue entry by assigning null to the textvalue for the field
        (In customer environment this value was already corrupted with no root cause)
        update customfieldvalue set textvalue='null' where issue=<issue_id> 
      • Migrate this project.

         

      Expected Results

      A valid/meaningful error should be displayed during the data preparation stage (Null Pointer Exception should be catched)

      Actual Results

      The Data preperation fails with the NPE error.

      2024-01-16 15:49:02,646 pool-87-thread-3 ERROR Administrator 947x93539x4 14fepla 84.135.183.239 /rest/migration/latest/check/plan/<Plan_ID> [migration.export.framework.DefaultExportFailureHandler] 275c600697b36423ad6dfffb5c4f81fe47cb52b2: Exporting entity Issue <Issue_Number> failed
      java.lang.NullPointerException
          at com.atlassian.jira.migration.export.core.customfield.jsd.JsdCustomFieldValueParser.defineSlaCustomFieldValue(JsdCustomFieldValueParser.kt:128)
          at com.atlassian.jira.migration.export.core.customfield.jsd.JsdCustomFieldValueParser.deriveCustomFieldValue(JsdCustomFieldValueParser.kt:93)
          at com.atlassian.jira.migration.export.core.customfield.CustomFieldValueExportHelper.exportCustomFieldValueForIssue(CustomFieldValueExportHelper.kt:86)
          at com.atlassian.jira.migration.export.core.issue.V2IssueCustomFieldValueExportMapper.mapCustomFieldValues(V2IssueCustomFieldValueExportMapper.kt:62)
          at com.atlassian.jira.migration.export.core.issue.IssueExporter.mapCustomFields(IssueExporter.kt:501)
          at com.atlassian.jira.migration.export.core.issue.IssueExporter.exportData(IssueExporter.kt:187)
          at com.atlassian.jira.migration.export.core.issue.IssueExporter.exportData(IssueExporter.kt:84)
          at com.atlassian.jira.migration.export.framework.ExportService$exportJiraEntity$1$1.invoke(ExportService.kt:304)
          at com.atlassian.jira.migration.export.framework.ExportService$exportJiraEntity$1$1.invoke(ExportService.kt:303)
          at com.atlassian.jira.migration.metrics.TimingMetrics.time(TimingMetrics.kt:24)
          at com.atlassian.jira.migration.export.framework.ExportService.exportJiraEntity-0E7RQCE(ExportService.kt:303)
          at com.atlassian.jira.migration.export.framework.ExportService.exportByEntityImpl(ExportService.kt:247)
          at com.atlassian.jira.migration.export.framework.ExportService.exportByEntityImpl$default(ExportService.kt:225)
          at com.atlassian.jira.migration.export.framework.ExportService.exportOrThrow(ExportService.kt:125)
          at com.atlassian.jira.migration.export.framework.ExportService.exportOrThrow$default(ExportService.kt:119)
          at com.atlassian.jira.migration.export.core.project.ProjectExporter.exportIssuesSequential(ProjectExporter.kt:402)
          at com.atlassian.jira.migration.export.core.project.ProjectExporter.exportIssues(ProjectExporter.kt:315)
          at com.atlassian.jira.migration.export.core.project.ProjectExporter.access$exportIssues(ProjectExporter.kt:81)
          at com.atlassian.jira.migration.export.core.project.ProjectExporter$childrenActions$5.invoke(ProjectExporter.kt:207)
          at com.atlassian.jira.migration.export.core.project.ProjectExporter$childrenActions$5.invoke(ProjectExporter.kt:199)
          at com.atlassian.jira.migration.export.framework.ExportService.continueWithChildrenActions(ExportService.kt:321)
          at com.atlassian.jira.migration.export.framework.ExportService.exportByEntityImpl(ExportService.kt:250)
          at com.atlassian.jira.migration.export.framework.ExportService.exportByEntityImpl$default(ExportService.kt:225)
          at com.atlassian.jira.migration.export.framework.ExportService.exportOrThrow(ExportService.kt:125)
          at com.atlassian.jira.migration.export.framework.ExportService.exportOrThrow$default(ExportService.kt:119)
          at com.atlassian.jira.migration.export.ExportFacade.exportProjectReportData(ExportFacade.kt:310)
          at com.atlassian.jira.migration.preflight.reports.DataExtractorFromProjects$gatherReportsDataFromProjectParallel$futures$1$1$1.invoke(DataExtractorFromProjects.kt:170)
          at com.atlassian.jira.migration.preflight.reports.DataExtractorFromProjects$gatherReportsDataFromProjectParallel$futures$1$1$1.invoke(DataExtractorFromProjects.kt:169)
          at com.atlassian.jira.migration.jiraservice.JiraExtensionsKt.wrap(JiraExtensions.kt:19)
          at com.atlassian.jira.migration.preflight.reports.DataExtractorFromProjects.gatherReportsDataFromProjectParallel$lambda$5$lambda$4(DataExtractorFromProjects.kt:169)
          at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.base/java.lang.Thread.run(Unknown Source) 

      Workaround

      Way to recover, would be to go individually on each affected issue and work on 'Recalculate all SLAs' available on the issue view, right corner.

      Attachments

        Issue Links

          Activity

            People

              c44f054634fb Tanjot Bhatia
              e0621f72df9f Bhavana V
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: