Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Getting NullPointerException in ContextHandlerCollection

Eclipse Jetty 8.x is EOL (End of Life) as of November 2014.

It is also subject to various security issues at this point (as it's not been kept up to date, a crucial part of public facing server software)

Please consider upgrading.

Lastly, AsyncContinuation has been dropped entirely in favor of the standard Servlet 3.0 AsyncContext.

Joakim Erdfelt / joakim@xxxxxxxxxxx

On Mon, Jun 15, 2020 at 2:06 AM Gurudatta Pai <gurudatta.pai07@xxxxxxxxx> wrote:
Hi All,

I am facing a problem in Jetty version 8.1.x.

Using `asyncContext = (AsyncContinuation) baseRequest.startAsync()` to follow the suspend/resume model which jetty provides. When the request is re-dispatched with asyncContext.resume() I get a NullPointerException() in the following code of

I see that the asyncContext.getContextHandler() method can return a null and the null check if handled in above code, but still I see a NPE. 

Trace from Arthus

`---ts=2020-06-11 22:52:33;thread_name=qtp877855051-143;id=8f;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@18b4aac2
    `---[0.534915ms] org.eclipse.jetty.server.handler.ContextHandlerCollection:handle()
        +---[0.007736ms] org.eclipse.jetty.server.handler.ContextHandlerCollection:getHandlers() #183
        +---[0.006051ms] org.eclipse.jetty.server.Request:getAsyncContinuation() #187
        +---[0.005221ms] org.eclipse.jetty.server.AsyncContinuation:isAsync() #188
        +---[0.263914ms] org.eclipse.jetty.server.AsyncContinuation:getContextHandler() #190 [throws Exception]
        `---[0.0016ms] throw:java.lang.NullPointerException() #905

Could you please let me understand why NPE is thrown here or am I missing something?

jetty-users mailing list
To unsubscribe from this list, visit

Back to the top