java.lang.NullPointerException: null

Java.net JIRA | rantav | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    This is probably in the same neighborhood as this issue: https://java.net/jira/browse/JERSEY-2683 However this one (the NPE) happens much more often. It tends to show up where servers are loaded and there is no easy way to repro it. Happens a few times a day on loaded servers. What's interesting about this one is that most of the time it occurs 2-3 times a day but in some rare cases a running server gets into a situation where this error appears and then it just won't stop appearing rendering all following servlet requests with errors. {code} org.eclipse.jetty.servlet.ServletHandler: /pixel.gif java.lang.NullPointerException: null ! at java.util.LinkedList$ListItr.next(LinkedList.java:891) ! at com.sun.jersey.spi.container.servlet.WebComponent$Writer.writeHeaders(WebComponent.java:339) ! at com.sun.jersey.spi.container.servlet.WebComponent$Writer.finish(WebComponent.java:266) ! at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:311) ! at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510) ! at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) ! at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) ! at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) ! at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540) ! at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715) ! at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1515) ! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) ! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:295) ! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:127) ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486) ! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486) ! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:519) ! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1097) ! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:448) ! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1031) ! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:173) ! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:162) ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ! at org.eclipse.jetty.server.Server.handle(Server.java:446) ! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:271) ! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:246) ! at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358) ! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601) ! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532) ! at java.lang.Thread.run(Thread.java:745) {code} Related discussion where I tried to tackle this without success: https://groups.google.com/forum/#!topic/dropwizard-user/xQZxPfjz6eI Thank you!

    Java.net JIRA | 2 years ago | rantav
    java.lang.NullPointerException: null
  2. 0

    GitHub comment 870#139157510

    GitHub | 2 years ago | nicolas-f
    java.lang.NullPointerException: null
  3. 0

    Grails 3.1.x GSON View Compilation Error

    GitHub | 1 year ago | ctoestreich
    java.lang.reflect.InvocationTargetException: null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Grails 3.1.x GSON View Compilation Error

    GitHub | 1 year ago | ctoestreich
    java.lang.reflect.InvocationTargetException: null
  6. 0

    GitHub comment 7#191298412

    GitHub | 1 year ago | ctoestreich
    java.lang.reflect.InvocationTargetException: null

    1 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

      null

      at java.util.LinkedList$ListItr.next()
    2. Java RT
      LinkedList$ListItr.next
      1. java.util.LinkedList$ListItr.next(LinkedList.java:891)
      1 frame
    3. Jersey
      WebComponent$Writer.finish
      1. com.sun.jersey.spi.container.servlet.WebComponent$Writer.writeHeaders(WebComponent.java:339)
      2. com.sun.jersey.spi.container.servlet.WebComponent$Writer.finish(WebComponent.java:266)
      2 frames
    4. Jersey
      WebApplicationImpl.handleRequest
      1. com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:311)
      2. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510)
      3. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
      4. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
      4 frames
    5. Jersey
      ServletContainer.service
      1. com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
      2. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
      3. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
      3 frames
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      1 frame
    7. Dropwizard Jetty Support
      NonblockingServletHolder.handle
      1. io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49)
      1 frame
    8. Jetty
      GzipFilter.doFilter
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1515)
      2. org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83)
      3. org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:295)
      3 frames
    9. Dropwizard Jetty Support
      BiDiGzipFilter.doFilter
      1. io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:127)
      1 frame
    10. Jetty
      ServletHandler$CachedChain.doFilter
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
      1 frame
    11. Dropwizard Servlet Support
      ThreadNameFilter.doFilter
      1. io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29)
      1 frame
    12. Jetty
      HandlerWrapper.handle
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
      2. org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:519)
      3. org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1097)
      4. org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:448)
      5. org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1031)
      6. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
      7. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      7 frames
    13. Metrics Integration for Jetty 9.1 and higher
      InstrumentedHandler.handle
      1. com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:173)
      1 frame
    14. Dropwizard Jetty Support
      RoutingHandler.handle
      1. io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51)
      1 frame
    15. Jetty
      QueuedThreadPool$3.run
      1. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      2. org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:162)
      3. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      4. org.eclipse.jetty.server.Server.handle(Server.java:446)
      5. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:271)
      6. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:246)
      7. org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
      8. org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
      9. org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
      9 frames
    16. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame