tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Preißer <>
Subject RE: [VOTE] Release Apache Tomcat 8.0.0-RC6
Date Mon, 09 Dec 2013 21:40:14 GMT
Hi Mark,

> -----Original Message-----
> From: Mark Thomas []
> Sent: Monday, December 9, 2013 9:19 PM
> To: Tomcat Developers List
> Subject: [VOTE] Release Apache Tomcat 8.0.0-RC6
> The proposed Apache Tomcat 8.0.0 release candidate 6 is now available
> for voting.
> Given this is a release candidate I am working on the basis that it is
> equivalent to an alpha. The main changes since RC5 are:
> - Better handling of generic types in the WebSocket 1.0 implementation
> - Refactor resource handling for the class loader
> - Add Cobertura support to the unit tests
> - Remove anti-Jar locking feature and replace it with open stream
>   tracking
> - Update to Commons Pool 2.0 release
> - Complete refactoring of TLD handling including caching of parsed TLDs
> - More consistent handling of XML validation options
> - Numerous bug fixes
> It can be obtained from:
> The Maven staging repo is:
> The svn tag is:
> The proposed 8.0.0-RC6 release is:
> [ ] Broken - do not release
> [ ] Alpha - go ahead and release as 8.0.0-RC6 alpha

With Tomcat 8.0.0-RC6, I seem to have problems serving large static files in one of my webapps.

I've run it on a Windows Server 2012 R2 system with Java 1.7.0_45 (64-Bit) and the NIO HTTP
The webapp contains a large static file with a size of 4,582,875,812 bytes.

When I try to download that file in the browser, I get the following exception:

09-Dec-2013 22:21:22.511 SEVERE [http-nio-8006-exec-2] org.apache.catalina.core.StandardWrapperValve.invoke
Servlet.service() for servlet [default] in context with path [] threw exception
 java.lang.ArrayIndexOutOfBoundsException: Unable to return [/temp/file.bin] as a byte array
since the resource is [4,582,875,812] bytes in size which is larger than the maximum size
of a byte array
	at org.apache.catalina.webresources.FileResource.getContent(
	at org.apache.catalina.webresources.CachedResource.getContent(
	at org.apache.catalina.servlets.DefaultServlet.copy(
	at org.apache.catalina.servlets.DefaultServlet.serveResource(
	at org.apache.catalina.servlets.DefaultServlet.doGet(
	at javax.servlet.http.HttpServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(
	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(
	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at common.XUaCompatibleHeaderFilter.doFilter(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.valves.ErrorReportValve.invoke(
	at org.apache.catalina.core.StandardEngineValve.invoke(
	at org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at org.apache.coyote.http11.AbstractHttp11Processor.process(
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

(The code in checks if the file size exceeds Integer.MAX_VALUE before
creating a byte array with that size - this would explain an OutOfMemoryError that I got with
another large file that is < 2 GB).

However, I am unable to reproduce this exception when placing the file in Tomcat's default
ROOT webapp. I suspect that the filters could have some effect. I think I did not get such
errors with the same webapp and Tomcat 7.0.42. I have not yet tested other Tomcat versions.
The "XUaCompatibleHeaderFilter" in the stacktrace just appends an "X-UA-Compatible: IE=Edge"
header to the response, then invokes chain.doFilter(request, response).
The Tuckey UrlRewriteFilter is configured to rewrite some URLs that start with a capital letter
(but not the URL which requests the static file).

Any idea what is going on there? Why would Tomcat create such a big byte array for a static

Konstantin Preißer

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

View raw message