Bug 48581 - 5.5.28: AccessControlException in InternalOutputBuffer.sendStatus
5.5.28: AccessControlException in InternalOutputBuffer.sendStatus
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Catalina
5.5.28
PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-01-20 12:29 UTC by Konstantin Kolinko
Modified: 2010-03-03 23:39 UTC (History)
0 users



Attachments
localhost.2010-01-20.log (6.11 KB, text/plain)
2010-01-20 12:30 UTC, Konstantin Kolinko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kolinko 2010-01-20 12:29:06 UTC
Steps to reproduce:
1. install apache-tomcat-5.5.28 from a zip file
2. start it with a security manager,  catalina start -security
3. access  http://localhost:8080/
4. observe the error
5. refresh the page,   http://localhost:8080/
6. the page is displayed successfully, without errors

The stacktrace in step 4 is

20.01.2010 23:12:14 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet org.apache.jsp.index_jsp threw exception
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.org.apache.coyote)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPackageAccess(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:452)
	at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1616)
	at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:966)
	at org.apache.coyote.Response.action(Response.java:181)
	at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:576)
	at org.apache.coyote.Response.doWrite(Response.java:560)
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:365)
	at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323)
	at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:236)
	at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
	at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
	at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
	at sun.nio.cs.StreamEncoder.flush(Unknown Source)
	at java.io.OutputStreamWriter.flush(Unknown Source)
	at org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:185)
	at org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:128)
	at org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:540)
	at org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:255)
	at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:460)
	at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:143)
	at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:119)
	at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:326)
	at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:342)
	at org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
(...)


OS: Windows XP, 32-bit,  JRE version:
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

This error is reproducible with the current 5.5.x as of rev.900740 as well. I have not observed such error with 6.0.x.
Comment 1 Konstantin Kolinko 2010-01-20 12:30:05 UTC
Created attachment 24867 [details]
localhost.2010-01-20.log
Comment 2 Mark Thomas 2010-02-02 09:10:14 UTC
A patch has been proposed for 5.5.x.
Comment 3 Mark Thomas 2010-03-03 23:39:38 UTC
This has been fixed in 5.5.x and will be included in 5.5.29 onwards.