Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 28795 invoked from network); 2 Nov 2009 07:44:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Nov 2009 07:44:41 -0000 Received: (qmail 74548 invoked by uid 500); 2 Nov 2009 07:44:40 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 74483 invoked by uid 500); 2 Nov 2009 07:44:40 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 74472 invoked by uid 99); 2 Nov 2009 07:44:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 07:44:40 +0000 X-ASF-Spam-Status: No, hits=-10.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 07:44:37 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id 8EF06234C498; Sun, 1 Nov 2009 23:44:17 -0800 (PST) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: DO NOT REPLY [Bug 48097] NoClassDefFoundError on first access of first jsp X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 6 X-Bugzilla-Component: Catalina X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: knst.kolinko@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: default X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Message-Id: <20091102074417.8EF06234C498@brutus.apache.org> Date: Sun, 1 Nov 2009 23:44:17 -0800 (PST) https://issues.apache.org/bugzilla/show_bug.cgi?id=48097 --- 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 (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } The exception occurs when calling response.setContentType(). The exception is: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.org.apache.catalina.connector) 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 o.a.catalina.security.SecurityClassLoad#loadCoyotePackage() 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 concerned?) -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org