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

Can not complete Nexus Repository 2 to 3 upgrade because of org.codehaus.plexus.util.xml.pull.XmlPullParserException: Missing version

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.14.13, 3.38.0, 3.39.0, 2.15.1
    • Fix Version/s: None
    • Component/s: Migration, NuGet
    • Labels:
    • Notability:
      2

      Description

      SYMPTOM:

      Running Nexus Repository Manager 2 to Nexus Repository Manager 3 migration (upgrade) for Nuget hosted repositories never completes. The continue button is disabled.

      EXPECTED BEHAVIOUR:

      If this was caused by some bad Nuget assets, Nexus should log some understandable message in the log file and also UI, and should skip it and allow Nexus administrator to continue.

      ACTUAL BEHAVIOUR:

      NXRM3 nexus.log shows:

      2022-06-06 23:55:10,692+0100 WARN  [plan-executor-14-thread-6]  admin com.sonatype.nexus.migration.repository.ProcessChangesStep - Process changes failed
      javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
          at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:255)
          at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:217)
          at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:64)
          at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:154)
          at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:115)
          at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76)
          at com.sun.proxy.$Proxy302.get(Unknown Source)
          at com.sonatype.nexus.migration.client.RepositoryChangelogClient$ChangelogEndpoint$get.call(Unknown Source)
          at com.sonatype.nexus.migration.client.RepositoryChangelogClient$1.get(RepositoryChangelogClient.groovy:168)
          at com.sonatype.nexus.migration.client.RepositoryChangelogClient$ChangelogConnection$get.call(Unknown Source)
          at com.sonatype.nexus.migration.repository.ProcessChangesStep$_after_closure4$_closure5.doCall(ProcessChangesStep.groovy:427)
          at com.sonatype.nexus.migration.repository.ProcessChangesStep$_after_closure4$_closure5.doCall(ProcessChangesStep.groovy)
          at sun.reflect.GeneratedMethodAccessor595.invoke(Unknown Source)
      ...
      

      At the same time, NXRM2 nexus.log shows:

      2022-06-06 23:55:10,673+0100 WARN  [qtp1168561745-53243] *UNKNOWN org.sonatype.sisu.siesta.server.internal.mappers.ThrowableExceptionMapper - java.lang.RuntimeException: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Missing version
      java.lang.RuntimeException: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Missing version
          at com.google.common.base.Throwables.propagate(Throwables.java:160)
          at com.sonatype.nexus.migrationagent.repository.migrators.NugetRepositoryMigratorSupport.extractNugetMetadata(NugetRepositoryMigratorSupport.java:120)
          at com.sonatype.nexus.migrationagent.repository.migrators.NugetRepositoryMigratorSupport.getPackageCoords(NugetRepositoryMigratorSupport.java:107)
          at com.sonatype.nexus.migrationagent.repository.migrators.NugetRepositoryMigratorSupport.extract(NugetRepositoryMigratorSupport.java:68)
          at com.sonatype.nexus.migrationagent.repository.RepositoryMigratorSupport.extract(RepositoryMigratorSupport.java:266)
          at com.sonatype.nexus.migrationagent.repository.RepositoryMigrator$extract.call(Unknown Source)
          at com.sonatype.nexus.migrationagent.rest.RepositoryChangelogResource$_get_closure1$_closure2.doCall(RepositoryChangelogResource.groovy:117)
          at sun.reflect.GeneratedMethodAccessor554.invoke(Unknown Source)
      ...
      

      Because of above errors, suspecting the nuspec file for some asset under some repository may not contain the version information.
      But current nexus.log does not say which file or which repository.

      EXAMPLE COMMAND TO FIND BROKEN nupkg

      cd /opt/sonatype/sonatype-work/nexus/storage/<nuget-reponame>;
      find . -not -path '*/.*' -type f -iname "*.nupkg" -print0 | xargs -0 -n1 -I {} -P2 bash -c '_f={};zipgrep -lE "<version>.+</version>" $_f 2>/dev/null | grep -q "\.nuspec" || echo "No <version> for $_f"';
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            hosako Hajime Osako
            Last Updated By:
            Rich Seddon Rich Seddon
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title