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

A NuGet package that is in Nexus 2.x storage but not in its database causes a NullPointerException on migration to Nexus 3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.14.4, 2.14.5, 3.3.1
    • Fix Version/s: 2.14.5, 3.5.0
    • Component/s: Migration, NuGet
    • Labels:
    • Story Points:
      2
    • Release Note:
      Yes

      Description

      If a NuGet package is in repository storage but not in the Nexus 2.x database you will get an NPE in Nexus 3 when it migrates it.

      To reproduce this, just place a NuGet package into directly into storage in the right spot in Nexus 2, and run an upgrade to Nexus 3.

       

      2017-06-28 14:59:47,246-0500 ERROR [plan-executor-8-thread-2] admin com.sonatype.nexus.migration.repository.ProcessChangesStep - Failed processing of CREATE nuget:/Microsoft.AspNet.WebApi.WebHost/5.2.3/Microsoft.AspNet.WebApi.WebHost-5.2.3.nupkg, will ignore and move on. null
      java.lang.NullPointerException: null
      at com.sonatype.nexus.migration.repository.migrators.NugetHostedRepositoryMigrator.nugetCoords(NugetHostedRepositoryMigrator.java:268) [na:na]
      at com.sonatype.nexus.migration.repository.migrators.NugetHostedRepositoryMigrator.recordMetadata(NugetHostedRepositoryMigrator.java:74) [na:na]
      at com.sonatype.nexus.migration.repository.migrators.RepositoryMigratorSupport.processChange(RepositoryMigratorSupport.java:134) [na:na]
      at com.sonatype.nexus.migration.repository.RepositoryMigrator$processChange.call(Unknown Source) [na:na]
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) [na:na]
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) [na:na]
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) [na:na]
      at com.sonatype.nexus.migration.repository.ProcessChangesStep$_submit_closure2.doCall(ProcessChangesStep.groovy:317) [na:na]
      at com.sonatype.nexus.migration.repository.ProcessChangesStep$_submit_closure2.doCall(ProcessChangesStep.groovy) [na:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.8.0_102]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [na:1.8.0_102]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_102]
      at java.lang.reflect.Method.invoke(Method.java:498) [na:1.8.0_102]
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) [na:na]
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) [na:na]
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) [na:na]
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024) [na:na]
      at groovy.lang.Closure.call(Closure.java:414) [na:na]
      at groovy.lang.Closure.call(Closure.java:408) [na:na]
      at groovy.lang.Closure.run(Closure.java:495) [na:na]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_102]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_102]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102

      This may also affect npm.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jstephens Joseph Stephens
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Peter Lynch
              Team:
              Nexus - Formats
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title