are you sure that the client/browser doesn't close the socket somehow?
broken pipe or clientabort exceptions seems to me that the browser shutdown
the request
because the user closes the browser or did already go to another page or
canceld the request.
Or the browser things that it already has it all? Because or the content
lenght that is set? (just a guess)
johan
On 10/3/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
The exception occurs when copying the byte array into the output
stream, right after 8192 bytes have been copied. It feels like a jetty
bug, but I am not certain at this point.
from wicket.util.io.Streams
public static int copy(final InputStream in, final OutputStream
out)
throws IOException
{
final byte[] buffer = new byte[4096];
int bytesCopied = 0;
while (true)
{
int byteCount = in.read(buffer, 0, buffer.length);
if (byteCount <= 0)
{
break;
}
out.write(buffer, 0, byteCount);
bytesCopied += byteCount;
}
return bytesCopied;
}
On 10/3/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> When I generate a dynamic web resource and it is about 7.2kb,
> generating and downloading the resource goes OK. When I create a
> (much) larger download, rendering the resource breaks with a broken
> pipe error.
>
> Does anyone know what happens here? I attached the stacktraces I get.
>
>
> wicket.WicketRuntimeException: method IResourceListener of interface
> wicket.IResourceListener targetted at component [MarkupContainer
> [Component id = aanmaken, page =
> nl.topicus.iridium.web.gui.financieel.incasso.IncassoRunTonenPage,
> path = 8:aanmaken.IncassoRunTonenPage$5, isVisible = true, isVersioned
> = false]] threw an exception
> at
wicket.request.target.resource.ComponentResourceRequestTarget.respond(
ComponentResourceRequestTarget.java:68)
> at wicket.request.compound.DefaultResponseStrategy.respond(
DefaultResponseStrategy.java:49)
> at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(
AbstractCompoundRequestCycleProcessor.java:66)
> at wicket.RequestCycle.doProcessEventsAndRespond(
RequestCycle.java:869)
> at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:896)
> at wicket.RequestCycle.step(RequestCycle.java:977)
> at wicket.RequestCycle.steps(RequestCycle.java:1051)
> at wicket.RequestCycle.request(RequestCycle.java:455)
> at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
:215)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at org.mortbay.jetty.servlet.ServletHolder.handle(
ServletHolder.java:428)
> at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
WebApplicationHandler.java:473)
> at org.mortbay.jetty.servlet.ServletHandler.handle(
ServletHandler.java:568)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
> at org.mortbay.jetty.servlet.WebApplicationContext.handle(
WebApplicationContext.java:633)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> at org.mortbay.jetty.plus.PlusWebAppContext.handle(
PlusWebAppContext.java:158)
> at org.mortbay.http.HttpServer.service(HttpServer.java:909)
> at org.mortbay.http.HttpConnection.service(HttpConnection.java
:816)
> at org.mortbay.http.HttpConnection.handleNext(
HttpConnection.java:982)
> at org.mortbay.http.HttpConnection.handle(HttpConnection.java
:833)
> at org.mortbay.http.SocketListener.handleConnection(
SocketListener.java:244)
> at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java
:357)
> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java
:534)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
wicket.request.target.resource.ComponentResourceRequestTarget.respond(
ComponentResourceRequestTarget.java:64)
> ... 24 more
> Caused by: wicket.WicketRuntimeException: Unable to render resource
> stream [EMAIL PROTECTED]
> at wicket.Resource.respond(Resource.java:279)
> at wicket.Resource.onResourceRequested(Resource.java:135)
> at wicket.markup.html.link.ResourceLink.onResourceRequested(
ResourceLink.java:124)
> ... 29 more
> Caused by: EOFException(java.net.SocketException: Broken pipe)
> at org.mortbay.http.BufferedOutputStream.flush(
BufferedOutputStream.java:206)
> at org.mortbay.util.ByteBufferOutputStream.ensureSpareCapacity(
ByteBufferOutputStream.java:357)
> at org.mortbay.util.ByteBufferOutputStream.write(
ByteBufferOutputStream.java:197)
> at org.mortbay.http.BufferedOutputStream.write(
BufferedOutputStream.java:146)
> at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java
:423)
> at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java
:54)
> at wicket.util.io.Streams.copy(Streams.java:56)
> at wicket.Resource.respond(Resource.java:240)
> ... 31 more
>
>
> --
> <a href="http://www.thebeststuffintheworld.com/vote_for/wicket">Vote</a>
> for <a href="http://www.thebeststuffintheworld.com/stuff/wicket
">Wicket</a>
> at the <a href="http://www.thebeststuffintheworld.com/">Best Stuff in
> the World!</a>
>
--
<a href="http://www.thebeststuffintheworld.com/vote_for/wicket">Vote</a>
for <a href="http://www.thebeststuffintheworld.com/stuff/wicket
">Wicket</a>
at the <a href="http://www.thebeststuffintheworld.com/">Best Stuff in
the World!</a>