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

NPM Metadata Rebuild Failing Due to NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.29.2
    • Fix Version/s: 3.31.0
    • Component/s: NPM
    • Labels:
      None

      Description

      NPM Metadata Rebuild crashes with a NullPointerException when the '.bytes' file for a package is missing from the blob storage but the corresponding asset is present in the database.

       

      Caused by: java.lang.NullPointerException: null
       at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:878)
       at org.sonatype.nexus.repository.npm.internal.NpmPackageId.parse(NpmPackageId.java:131)
       at org.sonatype.nexus.repository.npm.internal.orient.NpmPackageRootMetadataUtils.getPackageRootLatestVersion(NpmPackageRootMetadataUtils.java:153)
       at org.sonatype.nexus.repository.npm.internal.orient.NpmPackageRootMetadataUtils.createFullPackageMetadata(NpmPackageRootMetadataUtils.java:111)
       at org.sonatype.nexus.repository.npm.repair.orient.NpmRepairPackageRootComponent.maybeUpdateAsset(NpmRepairPackageRootComponent.java:110)
       at org.sonatype.nexus.repository.npm.repair.orient.NpmRepairPackageRootComponent.updateAsset(NpmRepairPackageRootComponent.java:102)
       at org.sonatype.nexus.repository.repair.RepairMetadataComponent.updateAssets(RepairMetadataComponent.java:127)
       at org.sonatype.nexus.repository.repair.RepairMetadataComponent.lambda$1(RepairMetadataComponent.java:117)
       at org.sonatype.nexus.transaction.OperationPoint.proceed(OperationPoint.java:64)
       at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:57)
       at org.sonatype.nexus.transaction.Operations.proceedWithTransaction(Operations.java:232)
       at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:223)
       at org.sonatype.nexus.transaction.Operations.call(Operations.java:166)
       at org.sonatype.nexus.repository.repair.RepairMetadataComponent.processBatchWith(RepairMetadataComponent.java:115)
       at org.sonatype.nexus.repository.repair.RepairMetadataComponent.doRepairRepositoryWith(RepairMetadataComponent.java:91)
       at org.sonatype.nexus.repository.repair.RepairMetadataComponent.doRepairRepository(RepairMetadataComponent.java:102)
       at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
       at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
       at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
       at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
       at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
       at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
       at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
       at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
       at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
       at org.sonatype.nexus.repository.npm.repair.orient.NpmRepairPackageRootComponent.repair(NpmRepairPackageRootComponent.java:94)

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            oshiyanbade Olu Shiyanbade
            Last Updated By:
            Peter Lynch Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                tigCommentSecurity.panel-title