Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3460

Async servlet: HttpServletResponse.sendError() throws UT000048 if error page set

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      I have replicated this with a trivial async servlet (attached). Deploy the war into a fresh WildFly 8.1.0.Final instance, and visit this URL:

      http://localhost:8080/AsyncTest/test

      The exception will appear in the server.log.

      Source code for the example is also attached.

      Show
      I have replicated this with a trivial async servlet (attached). Deploy the war into a fresh WildFly 8.1.0.Final instance, and visit this URL: http://localhost:8080/AsyncTest/test The exception will appear in the server.log. Source code for the example is also attached.

      Description

      If an async servlet calls sendError(...) when an <error-page> is added to the web.xml, the exception below occurs. If the <error-page> is removed (not possible for me), the servlet works just fine.

      Exception in thread "default task-29" java.lang.IllegalStateException: UT000048: No request is currently active
      at io.undertow.servlet.handlers.ServletRequestContext.requireCurrent(ServletRequestContext.java:63)
      at io.undertow.servlet.spec.SecurityActions.requireCurrentServletRequestContext(SecurityActions.java:86)
      at io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:324)
      at io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:311)
      at io.undertow.servlet.spec.HttpServletResponseImpl.sendError(HttpServletResponseImpl.java:128)
      at TestAsyncServlet$1.run(TestAsyncServlet.java:25)
      at io.undertow.servlet.spec.AsyncContextImpl$4.run(AsyncContextImpl.java:309)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

        Attachments

          Activity

            People

            Assignee:
            swd847 Stuart Douglas
            Reporter:
            darrenjones Darren Jones (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: