users@grizzly.java.net

Re: NPE when calling AsyncContext#complete

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 13 Jan 2009 21:14:54 -0500

Salut,

Jan Luehe wrote:
> [Reposting to correct list]
>
> I think I have run into a regression when trying Servlet 3.0 async
> support on top
> of Grizzly.
>
> Following is a very simple servlet:
>
> @WebServlet(urlPatterns = {"/test"}, asyncSupported = true)
> public class TestServlet extends HttpServlet {
>
> public void doGet(HttpServletRequest req, HttpServletResponse res)
> throws IOException, ServletException {
>
> if (!req.isAsyncSupported()) {
> throw new ServletException("Async not supported when it
> should");
> }
>
> req.startAsync().complete();

OK that's weird as the NPE means the CompletionHandler is null, which is
not supposed to happends :-). I've filled

https://grizzly.dev.java.net/issues/show_bug.cgi?id=392

and will try to fix it for 1.9.4, targeted this Friday.

Thanks!

-- Jeanfrancoois


> }
> }
>
>
> When I access it, I get the attached stack trace.
>
> To reproduce, deploy the attached WAR and access /async/test
>
> Any help/hints appreciated.
>
> Thanks!
>
>
> Jan
>
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net