java.lang.NullPointerException: in is null

Sonatype JIRA | Magnus Robertsson | 2 years ago
  1. 0

    When pushing with NuGet version 2.8.x and Nexus command line client 2.11.0-02 it fails and causes a NullPointerException: jvm 1 | 2014-12-18 10:11:06 WARN [qtp455961634-88] magnus com.sonatype.nexus.plugins.nuget.rest.NugetGalleryResource - in is null jvm 1 | java.lang.NullPointerException: in is null jvm 1 | at java.util.zip.ZipInputStream.<init>(ZipInputStream.java:100) ~[na:1.7.0] jvm 1 | at java.util.zip.ZipInputStream.<init>(ZipInputStream.java:79) ~[na:1.7.0] jvm 1 | at com.sonatype.nexus.plugins.nuget.odata.NuspecSplicer.extractNuspec(NuspecSplicer.java:132) ~[na:na] jvm 1 | at com.sonatype.nexus.plugins.nuget.odata.NuspecSplicer.header(NuspecSplicer.java:68) ~[na:na] jvm 1 | at com.sonatype.nexus.plugins.nuget.rest.NugetGalleryResource.upload(NugetGalleryResource.java:206) ~[na:na] jvm 1 | at org.sonatype.plexus.rest.resource.RestletResource.upload(RestletResource.java:366) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.sonatype.plexus.rest.resource.RestletResource.storeRepresentation(RestletResource.java:288) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.sonatype.nexus.rest.NexusRestletResource.storeRepresentation(NexusRestletResource.java:91) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.restlet.resource.Resource.put(Resource.java:706) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.restlet.resource.Resource.handlePut(Resource.java:603) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.restlet.Finder.handle(Finder.java:359) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.restlet.Router.handle(Router.java:504) [nexus-restlet1x-plugin-2.11.0-02/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.0-02/:na] ... The error is easy to reproduce: 1. Install nexus and enable the NuGet API-Key Realm in Server settings. 2. Add a NuGet repo, e.g. "nuget-test". 3. Set-up NuGet, e.g. "nuget sources add -Name Test -Source http://localhost:8081/nexus/service/local/nuget/nuget-test/ -UserName admin -Password admin123" 4. Try to push a NuGet package, e.g. nuget push -source http://localhost:8081/nexus/service/local/nuget/nuget-test/ *.nupkg 5. NuGet responds with: Failed to process request. 'Server Error'. The remote server returned an error: (500) Server Error.. The nexus log will contain the above exception. It seems like Nexus fails to read the input stream for some reason. It works with NuGet client 2.7.x. I've attached tcp dumps of the two cases.

    Sonatype JIRA | 2 years ago | Magnus Robertsson
    java.lang.NullPointerException: in is null
  2. 0

    NullPointerException at ZipInputStream

    Stack Overflow | 3 years ago | blo0p3r
    java.lang.NullPointerException: in is null
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Unable to use WURFL with Scala

    Stack Overflow | 7 months ago | bashan
    java.lang.NullPointerException: in is null
  5. 0

    #9103 (Use -XenableClosureCompiler to further optimize widgetset) – Vaadin

    vaadin.com | 3 months ago
    java.lang.NullPointerException: in is null

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      in is null

      at java.util.zip.ZipInputStream.<init>()
    2. Java RT
      ZipInputStream.<init>
      1. java.util.zip.ZipInputStream.<init>(ZipInputStream.java:100)[na:1.7.0]
      2. java.util.zip.ZipInputStream.<init>(ZipInputStream.java:79)[na:1.7.0]
      2 frames
    3. com.sonatype.nexus
      NugetGalleryResource.upload
      1. com.sonatype.nexus.plugins.nuget.odata.NuspecSplicer.extractNuspec(NuspecSplicer.java:132)[na:na]
      2. com.sonatype.nexus.plugins.nuget.odata.NuspecSplicer.header(NuspecSplicer.java:68)[na:na]
      3. com.sonatype.nexus.plugins.nuget.rest.NugetGalleryResource.upload(NugetGalleryResource.java:206)[na:na]
      3 frames
    4. ${project.groupId}:${project.artifactId}
      RestletResource.storeRepresentation
      1. org.sonatype.plexus.rest.resource.RestletResource.upload(RestletResource.java:366)[nexus-restlet1x-plugin-2.11.0-02/:na]
      2. org.sonatype.plexus.rest.resource.RestletResource.storeRepresentation(RestletResource.java:288)[nexus-restlet1x-plugin-2.11.0-02/:na]
      2 frames
    5. Nexus Core
      NexusRestletResource.storeRepresentation
      1. org.sonatype.nexus.rest.NexusRestletResource.storeRepresentation(NexusRestletResource.java:91)[nexus-restlet1x-plugin-2.11.0-02/:na]
      1 frame
    6. org.restlet.resource
      Resource.handlePut
      1. org.restlet.resource.Resource.put(Resource.java:706)[nexus-restlet1x-plugin-2.11.0-02/:na]
      2. org.restlet.resource.Resource.handlePut(Resource.java:603)[nexus-restlet1x-plugin-2.11.0-02/:na]
      2 frames
    7. org.restlet
      Filter.doHandle
      1. org.restlet.Finder.handle(Finder.java:359)[nexus-restlet1x-plugin-2.11.0-02/:na]
      2. org.restlet.Filter.doHandle(Filter.java:150)[nexus-restlet1x-plugin-2.11.0-02/:na]
      3. org.restlet.Filter.handle(Filter.java:195)[nexus-restlet1x-plugin-2.11.0-02/:na]
      4. org.restlet.Router.handle(Router.java:504)[nexus-restlet1x-plugin-2.11.0-02/:na]
      5. org.restlet.Filter.doHandle(Filter.java:150)[nexus-restlet1x-plugin-2.11.0-02/:na]
      5 frames