Nexus OSS 3.16.2-01 NullPointerException when fetching npm package


#1

Hi,
our Nexus produces a null pointer exception when users try to fetch npm packages:

2019-06-28 11:34:46,769+0200 WARN [qtp1902092465-46545] inet org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /artifacts/repository/npm-group/build
java.lang.NullPointerException: null
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:882)
at org.sonatype.nexus.repository.npm.internal.NpmResponses.ok(NpmResponses.java:62)
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:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:151)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:197)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:209)
at org.sonatype.nexus.repository.npm.internal.NpmGroupPackageHandler.buildMergedPackageRoot(NpmGroupPackageHandler.groovy:77)
at sun.reflect.GeneratedMethodAccessor748.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157

Interestingly it seems to occur only for some packages and for some packages it works.


#2

Hi,

This forum isn’t the right place to debug technical problems.

If you have a support contract with us you can use our support system at https://support.sonatype.com. Please note that the support system is for licensed customers only.

Otherwise, if you think this is a bug, you can try raising an issue at https://issues.sonatype.org in the “Dev - Nexus” issue.

Either way, provide a support zip file if you can get to the Nexus Repo UI. Or provide the complete nexus.log file otherwise.

Regards,
Mahendra


#3

OK, thanks.


#4

Have a look here: https://issues.sonatype.org/browse/NEXUS-19905

This was fixed in 3.17.0

There is a patch available on that issue for 3.16.1.

Regards,

Rich