tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 57824] New: fireRequestDestroyEvent does not get called when error page is not found
Date Thu, 16 Apr 2015 17:14:42 GMT

            Bug ID: 57824
           Summary: fireRequestDestroyEvent does not get called when error
                    page is not found
           Product: Tomcat 7
           Version: 7.0.59
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina

When upgrading tomcat to 7.0.59 we started experience strange errors in WELD
integration layer. It seems that when an error occurres (e.g. 403 reported by
HttpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN)), which does
not have error page handler declared in web.xml, the
org.apache.catalina.Context.fireRequestDestroyEvent does not get called.

The problem may be related to the following change:

which was a fix of BUG#57252.

The problem may be in StandardHostValve

lines 319:324
        ErrorPage errorPage = context.findErrorPage(statusCode);
        if (errorPage == null) {
            // Look for a default error page
            errorPage = context.findErrorPage(0);
        if (errorPage != null && response.setErrorReported()) {

i.e. if error page is not found the reposnse is not marked as

and then lines 214-216

            if (!request.isAsync() && !response.isErrorReportRequired()) {

i.e. if request is synchronous and the error report is not required (caused by
missing error page) the important lifecycle method is not called.

The workaround is to declare universal error handler page


which ensures that some error page is always found.

The problem may also be related to BUG#57314 as it has the same symptoms
reported in see What do WELD-xxx warnings mean?

ie WELD-000225, WELD-000335, WELD-000715 errors that report leaked resources
caused by missing lifecycle method call.

According to this bug report we thought that the problem is caused by async
requests (which we do not use explicitly), but declaring the error page
correctly seems to fix the problem.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message