java.lang.IllegalArgumentException: UT010046: No servlet context at to dispatch to

Spring JIRA | Mikael Norrman | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When running my Spring MVC application on Wildfly 8.2 application server and using DeferredResult I get an exception from the application server, caught by Spring, that no servlet context is found. I tried using the simplest possible form of DeferredResult to get this error and it fails every time. (I erased company-specific class from the following stacktrace) {noformat} Exception in thread "Thread-118" java.lang.IllegalArgumentException: UT010046: No servlet context at to dispatch to at io.undertow.servlet.spec.AsyncContextImpl.dispatch(AsyncContextImpl.java:158) at org.springframework.security.web.servletapi.HttpServlet3RequestFactory$SecurityContextAsyncContext.dispatch(HttpServlet3RequestFactory.java:251) at org.springframework.web.context.request.async.StandardServletAsyncWebRequest.dispatch(StandardServletAsyncWebRequest.java:123) at org.springframework.web.context.request.async.WebAsyncManager.setConcurrentResultAndDispatch(WebAsyncManager.java:351) at org.springframework.web.context.request.async.WebAsyncManager.access$200(WebAsyncManager.java:57) at org.springframework.web.context.request.async.WebAsyncManager$7.handleResult(WebAsyncManager.java:417) at org.springframework.web.context.request.async.DeferredResult.setResultInternal(DeferredResult.java:194) at org.springframework.web.context.request.async.DeferredResult.setResult(DeferredResult.java:183) at com.*******.Controller$1.run(********Controller.java:444) at java.lang.Thread.run(Thread.java:745) {noformat}

    Spring JIRA | 2 years ago | Mikael Norrman
    java.lang.IllegalArgumentException: UT010046: No servlet context at to dispatch to
  2. 0

    When running my Spring MVC application on Wildfly 8.2 application server and using DeferredResult I get an exception from the application server, caught by Spring, that no servlet context is found. I tried using the simplest possible form of DeferredResult to get this error and it fails every time. (I erased company-specific class from the following stacktrace) {noformat} Exception in thread "Thread-118" java.lang.IllegalArgumentException: UT010046: No servlet context at to dispatch to at io.undertow.servlet.spec.AsyncContextImpl.dispatch(AsyncContextImpl.java:158) at org.springframework.security.web.servletapi.HttpServlet3RequestFactory$SecurityContextAsyncContext.dispatch(HttpServlet3RequestFactory.java:251) at org.springframework.web.context.request.async.StandardServletAsyncWebRequest.dispatch(StandardServletAsyncWebRequest.java:123) at org.springframework.web.context.request.async.WebAsyncManager.setConcurrentResultAndDispatch(WebAsyncManager.java:351) at org.springframework.web.context.request.async.WebAsyncManager.access$200(WebAsyncManager.java:57) at org.springframework.web.context.request.async.WebAsyncManager$7.handleResult(WebAsyncManager.java:417) at org.springframework.web.context.request.async.DeferredResult.setResultInternal(DeferredResult.java:194) at org.springframework.web.context.request.async.DeferredResult.setResult(DeferredResult.java:183) at com.*******.Controller$1.run(********Controller.java:444) at java.lang.Thread.run(Thread.java:745) {noformat}

    Spring JIRA | 2 years ago | Mikael Norrman
    java.lang.IllegalArgumentException: UT010046: No servlet context at to dispatch to

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      UT010046: No servlet context at to dispatch to

      at io.undertow.servlet.spec.AsyncContextImpl.dispatch()
    2. Undertow Servlet
      AsyncContextImpl.dispatch
      1. io.undertow.servlet.spec.AsyncContextImpl.dispatch(AsyncContextImpl.java:158)
      1 frame
    3. Spring Security
      HttpServlet3RequestFactory$SecurityContextAsyncContext.dispatch
      1. org.springframework.security.web.servletapi.HttpServlet3RequestFactory$SecurityContextAsyncContext.dispatch(HttpServlet3RequestFactory.java:251)
      1 frame
    4. Spring
      DeferredResult.setResult
      1. org.springframework.web.context.request.async.StandardServletAsyncWebRequest.dispatch(StandardServletAsyncWebRequest.java:123)
      2. org.springframework.web.context.request.async.WebAsyncManager.setConcurrentResultAndDispatch(WebAsyncManager.java:351)
      3. org.springframework.web.context.request.async.WebAsyncManager.access$200(WebAsyncManager.java:57)
      4. org.springframework.web.context.request.async.WebAsyncManager$7.handleResult(WebAsyncManager.java:417)
      5. org.springframework.web.context.request.async.DeferredResult.setResultInternal(DeferredResult.java:194)
      6. org.springframework.web.context.request.async.DeferredResult.setResult(DeferredResult.java:183)
      6 frames