tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject ArrayIndexOutOfBoundsException
Date Tue, 24 Nov 2009 16:57:55 GMT
Hi everyone.

I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying
our war file, we get this error:

	at org.apache.tomcat.util.buf.ByteChunk.append(
	at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(
	at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(
	at org.apache.coyote.http11.InternalOutputBuffer.doWrite(
	at org.apache.coyote.Response.doWrite(
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
	at org.apache.tomcat.util.buf.ByteChunk.append(
	at org.apache.catalina.connector.OutputBuffer.writeBytes(
	at org.apache.catalina.connector.OutputBuffer.write(
	at org.apache.catalina.connector.CoyoteOutputStream.write(
	at com.fileflow.downloader.Downloader.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.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.connector.CoyoteAdapter.service(
	at org.apache.coyote.http11.Http11Processor.process(
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(

Notice that there are no number on the first line and it is usually the case.
The code that is "responsible is:

private ServletOutputStream out;
private InputStream in;
in = new FileInputStream(tmp);
out = response.getOutputStream();
byte[] buf = new byte[8 * 1024]; // 8K buffer
int bytesRead;
while((bytesRead = > 0) {
	out.write(buf, 0, bytesRead);

The updated code didn't change anything in that Servlet so I really have no clue what happened.
It happens on tomcat 6.0.18 and 6.0.20. Java is 1.6.0_11.

Thanks for any help.

Best Regards


View raw message