Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-29417

Nexus DB migrator fails if asset name is not set/empty

    Details

    • Story Points:
      2
    • Sprint:
      NXRM Sentinels Sprint 24
    • Notability:
      2
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      When migrating from OrientDB to an external DB, an asset record with no name can cause the migration to fail with the following exception:

      15:48:12 [main] ERROR o.s.batch.core.step.AbstractStep - Encountered an error executing step processComponentStep in job migrationFromOrientJob
      java.lang.StringIndexOutOfBoundsException: String index out of range: 0
       at java.lang.String.charAt(String.java:658)
       at com.sonatype.nexus.db.migrator.processor.content.AssetProcessor.formatPath(AssetProcessor.java:91)
       at com.sonatype.nexus.db.migrator.processor.content.AssetProcessor.process(AssetProcessor.java:72) 
       at com.sonatype.nexus.db.migrator.processor.content.AssetProcessor.process(AssetProcessor.java:34)
       at org.springframework.batch.item.support.ClassifierCompositeItemProcessor.processItem(ClassifierCompositeItemProcessor.java:63)
      ...
       at com.sonatype.nexus.db.migrator.MigratorApplication.main(MigratorApplication.java:76)
      

      Expected

      This was previously seen and fixed for APT repos via NEXUS-28621, however this issue can occur for other formats as well e.g. Maven, as such a solution is needed for all supported formats that could potentially hit this issue.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              orudyk Oleksii Rudyk
              Reporter:
              hardeepn Hardeep Nagra
              Last Updated By:
              Rich Seddon Rich Seddon
              Team:
              NXRM - Sentinels
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title