During migration from 2.14.13 to 3.33. Postgres, the following types of Exceptions were noticed in NXRM 3 nexus.log
In NX2 logs there is corresponding:
- Start with a test package.json in a local dir that includes this valid semantic version 1.0.87-test.1250+43260ff:
- Have an NXRM 2 instance running at with a hosted npm repo at https://localhost:8081/nexus/content/repositories/npmjs-internal - repo version 2.14.13 was used during this test.
- Configure NPM CLI with. suitable credentials
- npm publish --registry https://localhost:8081/nexus/content/repositories/npmjs-internal
- Verify the package metadata retrieved from https://localhost:8081/nexus/content/repositories/npmjs-internal/test-package only contains one version listed as 1.0.87-test.1250 ( not 1.0.87-test.1250+43260ff ) - this is expected and normal, this is exactly how the official registry behaves when deploying a package there with the same version.
- Verify the tarball URL in the package metadata refers to this URL http://localhost:8081/nexus/content/repositories/npmjs-internal/test-package/-/test-package-1230.0.87-test.1250.tgz and that downloading it works.
- Now stop NXRM, and move sonatype-work/nexus/db/npm directory aside.
- Start NXRM and manually run a rebuild hosted npm metadata task against the npmjs-internal repo.
- Now start migration to NXRM 3 (no matter Orient or NewDB) and get NullPointerException in NpmRepositoryMigrator
Diagnose the cause of the problem and prevent nullPointerException and if a non-resolvable problem, log a better message explaining what the problem is.