tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 48097] NoClassDefFoundError on first access of first jsp
Date Mon, 02 Nov 2009 07:44:17 GMT

--- Comment #7 from Konstantin Kolinko <> 2009-11-01 23:44:06
UTC ---
I debugged the case of the blank response.

The sequence of events is the following:

1) The index_jsp.class is successfully loaded, instantiated, and its _jspInit()
method was successfully called.
2) The error occurs in its _jspService(request, response) method.

The code there is the following:
    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
                  null, true, 8192, true);
      _jspx_page_context = pageContext;

    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch ( e) {}
        if (_jspx_page_context != null)
    } finally {

The exception occurs when calling response.setContentType(). The exception is: access denied

Because it occurs earlier than the _jspx_page_context variable is initialized,
the _jspx_page_context.handlePageException(t); line is not called and empty
response is returned to the client.

The failure in setContentType() method occurs in
ResponseFacade#setContentType(). It is caused by the attempt to load the
following class: ResponseFacade$SetContentTypePrivilegedAction

That class is listed in but, because I used
org.apache.catalina.startup.Catalina class to start Tomcat in the IDE, that
method was not called at all. It is called from Bootstrap#init() only.

Jasper's SecurityClassLoad on the contrary is called, because that occurs in
another place.

The blank page issue disappeared when I used o.a.c.startup.Bootstrap class
instead of Catalina.

I do not know, whether we should fix this bootstrap issue. (Is anyone

Configure bugmail:
------- 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