Hi Mark, > -----Original Message----- > From: Mark Thomas [mailto:ma...@apache.org] > 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: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.0-RC6/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-029/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tags/TOMCAT_8_0_0_RC6/ > > 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 connector. 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(FileResource.java:143) at org.apache.catalina.webresources.CachedResource.getContent(CachedResource.java:235) at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1793) at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:919) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:400) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at common.XUaCompatibleHeaderFilter.doFilter(XUaCompatibleHeaderFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:107) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:76) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:90) at org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionManagerValve.java:180) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:646) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1555) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) (The code in FileResource.java:143 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 file? Regards, Konstantin Preißer --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org