java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_0,1,1522095831) has been shut down

Google Groups | Sreejith S | 2 months 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

    Connect Framework shutting down - exceptions are not catching

    Google Groups | 2 months ago | Sreejith S
    java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_0,1,1522095831) has been shut down
  2. 0

    Jersey - Jersey 2.11 throws IllegalStateException: ServiceLocatorImpl has been shut down

    nabble.com | 1 year ago
    java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_84,85,1111434133) has been shut down
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Getting java.lang.NoSuchMethodError while starting connectors in distributed mode.

    Google Groups | 2 months ago | Renukaradhya H D
    javax.servlet.ServletException: java.lang.NullPointerException
  5. 0

    Sometimes I get this exception randomly: {code} 14:49:38.950 [qtp617213263-863] WARN org.eclipse.jetty.servlet.ServletHandler.doHandle() - javax.servlet.ServletException: java.lang.NullPointerException at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:391) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381) at org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:534) at org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:482) at org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:419) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1636) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:564) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:498) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98) at org.eclipse.jetty.server.Server.handle(Server.java:461) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:284) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException: null at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:300) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372) ... 22 common frames omitted {code} I have no repro steps. Part of the problem is that the stack-trace provides almost no information. I am guessing that a race condition is occurring whereby {{shutdown()}} is invoked while a task is executing. When the task completes, the {{finally}} block executes and throws this exception. I suggest adding extra checks that will log a proper error message instead of a NPE and {{shutdown()}} should check whether there are any outstanding tasks when it is invoked.

    Java.net JIRA | 3 years ago | cowwoc
    javax.servlet.ServletException: java.lang.NullPointerException

    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.IllegalStateException

      ServiceLocatorImpl(__HK2_Generated_0,1,1522095831) has been shut down

      at org.glassfish.jersey.servlet.WebComponent.serviceImpl()
    2. jersey-container-servlet-core
      ServletContainer.service
      1. org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)
      2. org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
      3. org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
      4. org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
      5. org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
      5 frames
    3. Jetty
      QueuedThreadPool$3.run
      1. org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      2. org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
      3. org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
      4. org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      5. org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      6. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      7. org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      8. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      9. org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      10. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      11. org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159)
      12. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      13. org.eclipse.jetty.server.Server.handle(Server.java:499)
      14. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      15. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      16. org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      17. org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      18. org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      18 frames
    4. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame