sunng87 / ring-jetty9-adapter

An enhanced version of jetty adapter for ring, with additional features like websockets, http/2 and http/3
Eclipse Public License 1.0
267 stars 48 forks source link

Async option causes a non-fatal error #138

Closed robinlahtinen closed 1 week ago

robinlahtinen commented 1 week ago

Hi, I started a new project using this adapter with reitit ring-handler. I get the following error on every request I do to the server. The request goes through normally. I get the error even if I create a simple web server using the exact code from examples/rj9a/async.clj.

Log:

org.eclipse.jetty.server.Response - writeError: status=500, message=java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "clojure.lang.IFn.invoke(Object, Object, Object, Object)" is null, response=org.eclipse.jetty.server.handler.ContextResponse@240dbce1
   data: {:slf4j/args [500 "java.lang.NullPointerException: Cannot invoke \"java.lang.Boolean.booleanValue()\" because the return value of \"clojure.lang.IFn.invoke(Object, Object, Object, Object)\" is null" #object[org.eclipse.jetty.server.handler.ContextResponse 0x240dbce1 "org.eclipse.jetty.server.handler.ContextResponse@240dbce1"]]}

<<< error <<<
  Root: java.lang.NullPointerException - Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "clojure.lang.IFn.invoke(Object, Object, Object, Object)" is null

Root stack trace:
  ring.adapter.jetty9.handlers.AsyncProxyHandler/handle at :-1
  org.eclipse.jetty.server.handler.ContextHandler/handle at ContextHandler.java:858
  org.eclipse.jetty.server.Server/handle at Server.java:181
  org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker/run at HttpChannelState.java:648
  org.eclipse.jetty.server.internal.HttpConnection/onFillable at HttpConnection.java:403
  org.eclipse.jetty.io.AbstractConnection$ReadCallback/succeeded at AbstractConnection.java:322
  org.eclipse.jetty.io.FillInterest/fillable at FillInterest.java:99
  org.eclipse.jetty.io.SelectableChannelEndPoint$1/run at SelectableChannelEndPoint.java:53
  org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy/runTask at AdaptiveExecutionStrategy.java:478
  org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy/consumeTask at AdaptiveExecutionStrategy.java:426
  org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy/tryProduce at AdaptiveExecutionStrategy.java:293
  org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy/produce at AdaptiveExecutionStrategy.java:195
  org.eclipse.jetty.util.thread.QueuedThreadPool/runJob at QueuedThreadPool.java:979
  org.eclipse.jetty.util.thread.QueuedThreadPool$Runner/doRunJob at QueuedThreadPool.java:1209
  org.eclipse.jetty.util.thread.QueuedThreadPool$Runner/run at QueuedThreadPool.java:1164
  java.lang.Thread/run at Thread.java:1570
>>> error >>>
sunng87 commented 1 week ago

The fix has been released in 0.33.5