When using the SSE Jersey extension, the FiberHttpServlet seems to have problem integrating with Jersey's way of working.
When the stream is started, I get the following stacktrace:
WARN [2016-10-26 12:57:50,460] /: co.paralleluniverse.fibers.jersey.ServletContainer-588f63c: Exception in servlet's fiber, dispatching to container
! java.lang.NullPointerException: null
! at org.glassfish.jersey.servlet.async.AsyncContextDelegateProviderImpl$ExtensionImpl.getAsyncContext(AsyncContextDelegateProviderImpl.java:105)
! at org.glassfish.jersey.servlet.async.AsyncContextDelegateProviderImpl$ExtensionImpl.suspend(AsyncContextDelegateProviderImpl.java:96)
! at org.glassfish.jersey.servlet.internal.ResponseWriter.suspend(ResponseWriter.java:125)
! at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:775)
! at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
! at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
! at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
! at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
! at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
! ... 20 common frames omitted
! Causing: javax.servlet.ServletException: java.lang.NullPointerException
! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)
! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
! at co.paralleluniverse.fibers.jersey.ServletContainer.service(ServletContainer.java:92)
! at co.paralleluniverse.fibers.servlet.FiberHttpServlet.exec0(FiberHttpServlet.java:228)
! at co.paralleluniverse.fibers.servlet.FiberHttpServlet.exec(FiberHttpServlet.java:203)
! at co.paralleluniverse.fibers.servlet.FiberHttpServlet$ServletSuspendableRunnable.run(FiberHttpServlet.java:176)
! at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:44)
! at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:32)
! at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1072)
! at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1067)
! at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:767)
! at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:266)
! at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:117)
! at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:74)
! at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
! at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
! at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
! at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
WARN [2016-10-26 12:57:50,462] org.eclipse.jetty.servlet.ServletHandler:
! java.lang.NullPointerException: null
! at org.glassfish.jersey.servlet.async.AsyncContextDelegateProviderImpl$ExtensionImpl.getAsyncContext(AsyncContextDelegateProviderImpl.java:105)
! at org.glassfish.jersey.servlet.async.AsyncContextDelegateProviderImpl$ExtensionImpl.suspend(AsyncContextDelegateProviderImpl.java:96)
! at org.glassfish.jersey.servlet.internal.ResponseWriter.suspend(ResponseWriter.java:125)
! at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:775)
! at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
! at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
! at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
! at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
! at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
! ... 20 common frames omitted
! Causing: javax.servlet.ServletException: java.lang.NullPointerException
! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)
! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
! at co.paralleluniverse.fibers.jersey.ServletContainer.service(ServletContainer.java:92)
! at co.paralleluniverse.fibers.servlet.FiberHttpServlet.exec0(FiberHttpServlet.java:228)
! at co.paralleluniverse.fibers.servlet.FiberHttpServlet.exec(FiberHttpServlet.java:203)
! at co.paralleluniverse.fibers.servlet.FiberHttpServlet$ServletSuspendableRunnable.run(FiberHttpServlet.java:176)
! at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:44)
! at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:32)
! at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1072)
! at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1067)
! at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:767)
! at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:266)
! at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:117)
! at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:74)
! at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
! at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
! at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
! at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
! Causing: javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NullPointerException
! at co.paralleluniverse.fibers.servlet.FiberHttpServlet.service(FiberHttpServlet.java:131)
! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49)
! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
! at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
! at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240)
! at io.dropwizard.jetty.ContextRoutingHandler.handle(ContextRoutingHandler.java:38)
! at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:386)
! at io.dropwizard.jetty.BiDiGzipHandler.handle(BiDiGzipHandler.java:68)
! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:56)
! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169)
! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
! at org.eclipse.jetty.server.Server.handleAsync(Server.java:575)
! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:336)
! at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:266)
! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
! at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
! at java.lang.Thread.run(Thread.java:745)
I think maybe it is related to the fact that FiberServletRequest does not support async management? I've seen in it that startAsync would throw an UnsupportedOperationException.
Hi,
When using the SSE Jersey extension, the
FiberHttpServlet
seems to have problem integrating with Jersey's way of working. When the stream is started, I get the following stacktrace:I think maybe it is related to the fact that
FiberServletRequest
does not support async management? I've seen in it thatstartAsync
would throw anUnsupportedOperationException
.