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

An npm package that is in NXRM2 storage but not in its database causes a NullPointerException on migration to NXRM3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.14.8, 3.10.0, 2.14.16, 3.21.0
    • Fix Version/s: None
    • Component/s: Migration, NPM
    • Labels:
    • Environment:
      Chrome MacOSX
    • Story Points:
      2

      Description

      If an npm package is in NXRM2 storage but not in the database on migration it will throw an NPE (see below) and skipover. While this behavior doesn't cause the migration to fail it's desired if we can include this component in the migration.

      2018-03-19 17:28:14,095-0400 ERROR [plan-executor-10-thread-2] admin com.sonatype.nexus.migration.repository.ProcessChangesStep - Failed processing of CREATE npmhosted:/acorn/-/acorn-0.0.1.tgz, will ignore and move on. null
      java.lang.NullPointerException: null
      	at com.sonatype.nexus.migration.repository.migrators.NpmRepositoryMigrator.getPackageName(NpmRepositoryMigrator.java:342)
      	at com.sonatype.nexus.migration.repository.migrators.NpmRepositoryMigrator.getOrCreatePackageRootAsset(NpmRepositoryMigrator.java:135)
      	at com.sonatype.nexus.migration.repository.migrators.NpmRepositoryMigrator.recordMetadata(NpmRepositoryMigrator.java:103)
      	at com.sonatype.nexus.migration.repository.migrators.RepositoryMigratorSupport.lambda$1(RepositoryMigratorSupport.java:195)
      	at com.sonatype.nexus.migration.repository.migrators.RepositoryMigratorSupport$$Lambda$338/1194003275.call(Unknown Source)
      	at org.sonatype.nexus.transaction.OperationPoint.proceed(OperationPoint.java:64)
      	at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
      	at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:200)
      	at org.sonatype.nexus.transaction.Operations.call(Operations.java:146)
      	at com.sonatype.nexus.migration.repository.migrators.RepositoryMigratorSupport.inStorageTx(RepositoryMigratorSupport.java:249)
      	at com.sonatype.nexus.migration.repository.migrators.RepositoryMigratorSupport.recordMetadata(RepositoryMigratorSupport.java:193)
      	at com.sonatype.nexus.migration.repository.migrators.RepositoryMigratorSupport.createOrUpdate(RepositoryMigratorSupport.java:166)
      	at com.sonatype.nexus.migration.repository.migrators.RepositoryMigratorSupport.processChange(RepositoryMigratorSupport.java:146)
      	at com.sonatype.nexus.migration.repository.RepositoryMigrator$processChange$0.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      	at com.sonatype.nexus.migration.repository.ProcessChangesStep$_submit_closure2.doCall(ProcessChangesStep.groovy:333)
      	at com.sonatype.nexus.migration.repository.ProcessChangesStep$_submit_closure2.doCall(ProcessChangesStep.groovy)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      	at groovy.lang.Closure.call(Closure.java:414)
      	at groovy.lang.Closure.call(Closure.java:408)
      	at groovy.lang.Closure.run(Closure.java:495)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      The same behavior for NuGet has been repaired in earlier version of NXRM3: NEXUS-13554

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jtom Joe Tom
              Last Updated By:
              Joe Tom
              Team:
              NXRM - Tron
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  tigCommentSecurity.panel-title