Summary: | java.lang.IllegalStateException: Calling [asyncComplete()] is not valid for a request with Async state [MUST_DISPATCH] | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | Rossen Stoyanchev <rstoyanchev> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 7.0.50 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Rossen Stoyanchev
2014-01-21 02:26:34 UTC
The problem was in the ErrorReportValve. It was taking over if the response had an error state and async had been started. As part of this it called complete(). The issue was that if dispatch had been called (e.g. to generate a custom error page in the app) the ErrorReportValve didn't let that happen. IN this case the ErrorReportValve no longer takes over so the dispatch() target can handle the error reporting. It will need to commit the response to stop the ErrorReportValve taking over after the dispatch. Fixed in 8.0.x for 8.0.0 and 7.0.x for 7.0.51. |