You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martijn Dashorst <ma...@gmail.com> on 2006/10/03 11:04:56 UTC

Proglem generating resource: broken pipe

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 wicket.markup.html.DynamicWebResource$1@1d66f1
	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>

Re: Re: Re: Proglem generating resource: broken pipe

Posted by Martijn Dashorst <ma...@gmail.com>.
OK,

it was a spurious span inside a link that cancelled the request for me...

<a href="#" wicket:id="resource"><span
onclick="setTimeout('window.location.reload()', 1000);return
true;">link</span></a>

Apparently you always have a 8kb buffer you can write to even when
another request comes in.

Consider this case closed.

Martijn

On 10/3/06, Johan Compagner <jc...@gmail.com> wrote:
> and that is exactly the number of bytes that it sent to the client?
>
> what about tomcat?
>
> johan
>
>
> On 10/3/06, Martijn Dashorst <ma...@gmail.com> wrote:
> >
> > mimeType        "application/zip"
> > length  24550
> >
> >
> > On 10/3/06, Matej Knopp <ma...@knopp.sk> wrote:
> > > What does the response header say?
> > >
> > > Martijn Dashorst wrote:
> > > > It is not a Jetty 5 specific bug, as in Jetty 6.0.1 I get this
> > exception.
> > > >
> > > > [2006-10-03 14:16:47,759] [btpool0-5] RequestCycle.step(1010) | method
> > > > IResourceListener of interface wicket.IResourceListener targetted at
> > > > component [MarkupContainer [Component id = aanmaken, page =
> > > > nl.topicus.iridium.web.gui.financieel.incasso.IncassoRunTonenPage,
> > > > path = 3:aanmaken.IncassoRunTonenPage$5, isVisible = true, isVersioned
> > > > = false]] threw an exception
> > > > 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 = 3: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:689)
> > > >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > > >        at
> > > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
> > > >        at
> > > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java
> > :356)
> > > >        at
> > > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java
> > :226)
> > > >        at
> > > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java
> > :627)
> > > >        at
> > > > org.mortbay.jetty.handler.ContextHandlerCollection.handle(
> > ContextHandlerCollection.java:149)
> > > >
> > > >        at
> > > > org.mortbay.jetty.handler.HandlerCollection.handle(
> > HandlerCollection.java:123)
> > > >
> > > >        at
> > > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java
> > :141)
> > > >        at org.mortbay.jetty.Server.handle(Server.java:269)
> > > >        at
> > > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java
> > :430)
> > > >        at
> > > > org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
> > HttpConnection.java:687)
> > > >
> > > >        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
> > > >        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java
> > :199)
> > > >        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java
> > :339)
> > > >        at
> > > > org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java
> > :270)
> > > >        at
> > > > org.mortbay.thread.BoundedThreadPool$PoolThread.run(
> > BoundedThreadPool.java:475)
> > > >
> > > > 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)
> > > >
> > > >        ... 25 more
> > > > Caused by: wicket.WicketRuntimeException: Unable to render resource
> > > > stream wicket.markup.html.DynamicWebResource$1@334d76
> > > >        at wicket.Resource.respond(Resource.java:279)
> > > >        at wicket.Resource.onResourceRequested(Resource.java:135)
> > > >        at
> > > > wicket.markup.html.link.ResourceLink.onResourceRequested(
> > ResourceLink.java:124)
> > > >
> > > >        ... 30 more
> > > > Caused by: org.mortbay.jetty.EofException
> > > >        at
> > > > org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:856)
> > > >        at
> > > > org.mortbay.jetty.HttpGenerator$Output.flush(HttpGenerator.java:1069)
> > > >        at
> > > > org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:764)
> > > >        at wicket.Resource.respond(Resource.java:245)
> > > >        ... 32 more
> > > > Caused by: java.nio.channels.ClosedChannelException
> > > >        at
> > > > sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java
> > :125)
> > > >        at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java
> > :323)
> > > >        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java
> > :354)
> > > >        at java.nio.channels.SocketChannel.write(SocketChannel.java
> > :360)
> > > >        at
> > > > org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:238)
> > > >        at
> > > > org.mortbay.jetty.nio.HttpChannelEndPoint.flush(
> > HttpChannelEndPoint.java:140)
> > > >
> > > >        at
> > > > org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:778)
> > > >        ... 35 more
> > > >
> > > >
> > > > On 10/3/06, Johan Compagner <jc...@gmail.com> wrote:
> > > >> 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 <ma...@gmail.com> 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 <ma...@gmail.com> 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 wicket.markup.html.DynamicWebResource$1@1d66f1
> > > >> > >         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>
> > > >> >
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > <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>

Re: Re: Proglem generating resource: broken pipe

Posted by Johan Compagner <jc...@gmail.com>.
and that is exactly the number of bytes that it sent to the client?

what about tomcat?

johan


On 10/3/06, Martijn Dashorst <ma...@gmail.com> wrote:
>
> mimeType        "application/zip"
> length  24550
>
>
> On 10/3/06, Matej Knopp <ma...@knopp.sk> wrote:
> > What does the response header say?
> >
> > Martijn Dashorst wrote:
> > > It is not a Jetty 5 specific bug, as in Jetty 6.0.1 I get this
> exception.
> > >
> > > [2006-10-03 14:16:47,759] [btpool0-5] RequestCycle.step(1010) | method
> > > IResourceListener of interface wicket.IResourceListener targetted at
> > > component [MarkupContainer [Component id = aanmaken, page =
> > > nl.topicus.iridium.web.gui.financieel.incasso.IncassoRunTonenPage,
> > > path = 3:aanmaken.IncassoRunTonenPage$5, isVisible = true, isVersioned
> > > = false]] threw an exception
> > > 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 = 3: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:689)
> > >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > >        at
> > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
> > >        at
> > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java
> :356)
> > >        at
> > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java
> :226)
> > >        at
> > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java
> :627)
> > >        at
> > > org.mortbay.jetty.handler.ContextHandlerCollection.handle(
> ContextHandlerCollection.java:149)
> > >
> > >        at
> > > org.mortbay.jetty.handler.HandlerCollection.handle(
> HandlerCollection.java:123)
> > >
> > >        at
> > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java
> :141)
> > >        at org.mortbay.jetty.Server.handle(Server.java:269)
> > >        at
> > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java
> :430)
> > >        at
> > > org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
> HttpConnection.java:687)
> > >
> > >        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
> > >        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java
> :199)
> > >        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java
> :339)
> > >        at
> > > org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java
> :270)
> > >        at
> > > org.mortbay.thread.BoundedThreadPool$PoolThread.run(
> BoundedThreadPool.java:475)
> > >
> > > 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)
> > >
> > >        ... 25 more
> > > Caused by: wicket.WicketRuntimeException: Unable to render resource
> > > stream wicket.markup.html.DynamicWebResource$1@334d76
> > >        at wicket.Resource.respond(Resource.java:279)
> > >        at wicket.Resource.onResourceRequested(Resource.java:135)
> > >        at
> > > wicket.markup.html.link.ResourceLink.onResourceRequested(
> ResourceLink.java:124)
> > >
> > >        ... 30 more
> > > Caused by: org.mortbay.jetty.EofException
> > >        at
> > > org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:856)
> > >        at
> > > org.mortbay.jetty.HttpGenerator$Output.flush(HttpGenerator.java:1069)
> > >        at
> > > org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:764)
> > >        at wicket.Resource.respond(Resource.java:245)
> > >        ... 32 more
> > > Caused by: java.nio.channels.ClosedChannelException
> > >        at
> > > sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java
> :125)
> > >        at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java
> :323)
> > >        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java
> :354)
> > >        at java.nio.channels.SocketChannel.write(SocketChannel.java
> :360)
> > >        at
> > > org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:238)
> > >        at
> > > org.mortbay.jetty.nio.HttpChannelEndPoint.flush(
> HttpChannelEndPoint.java:140)
> > >
> > >        at
> > > org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:778)
> > >        ... 35 more
> > >
> > >
> > > On 10/3/06, Johan Compagner <jc...@gmail.com> wrote:
> > >> 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 <ma...@gmail.com> 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 <ma...@gmail.com> 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 wicket.markup.html.DynamicWebResource$1@1d66f1
> > >> > >         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>
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>
>
> --
> <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>
>

Re: Re: Proglem generating resource: broken pipe

Posted by Martijn Dashorst <ma...@gmail.com>.
mimeType	"application/zip"	
length	24550	


On 10/3/06, Matej Knopp <ma...@knopp.sk> wrote:
> What does the response header say?
>
> Martijn Dashorst wrote:
> > It is not a Jetty 5 specific bug, as in Jetty 6.0.1 I get this exception.
> >
> > [2006-10-03 14:16:47,759] [btpool0-5] RequestCycle.step(1010) | method
> > IResourceListener of interface wicket.IResourceListener targetted at
> > component [MarkupContainer [Component id = aanmaken, page =
> > nl.topicus.iridium.web.gui.financieel.incasso.IncassoRunTonenPage,
> > path = 3:aanmaken.IncassoRunTonenPage$5, isVisible = true, isVersioned
> > = false]] threw an exception
> > 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 = 3: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:689)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >        at
> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
> >        at
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
> >        at
> > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
> >        at
> > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
> >        at
> > org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
> >
> >        at
> > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
> >
> >        at
> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
> >        at org.mortbay.jetty.Server.handle(Server.java:269)
> >        at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
> >        at
> > org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
> >
> >        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
> >        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
> >        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
> >        at
> > org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
> >        at
> > org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
> >
> > 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)
> >
> >        ... 25 more
> > Caused by: wicket.WicketRuntimeException: Unable to render resource
> > stream wicket.markup.html.DynamicWebResource$1@334d76
> >        at wicket.Resource.respond(Resource.java:279)
> >        at wicket.Resource.onResourceRequested(Resource.java:135)
> >        at
> > wicket.markup.html.link.ResourceLink.onResourceRequested(ResourceLink.java:124)
> >
> >        ... 30 more
> > Caused by: org.mortbay.jetty.EofException
> >        at
> > org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:856)
> >        at
> > org.mortbay.jetty.HttpGenerator$Output.flush(HttpGenerator.java:1069)
> >        at
> > org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:764)
> >        at wicket.Resource.respond(Resource.java:245)
> >        ... 32 more
> > Caused by: java.nio.channels.ClosedChannelException
> >        at
> > sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:125)
> >        at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java:323)
> >        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:354)
> >        at java.nio.channels.SocketChannel.write(SocketChannel.java:360)
> >        at
> > org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:238)
> >        at
> > org.mortbay.jetty.nio.HttpChannelEndPoint.flush(HttpChannelEndPoint.java:140)
> >
> >        at
> > org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:778)
> >        ... 35 more
> >
> >
> > On 10/3/06, Johan Compagner <jc...@gmail.com> wrote:
> >> 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 <ma...@gmail.com> 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 <ma...@gmail.com> 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 wicket.markup.html.DynamicWebResource$1@1d66f1
> >> > >         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>
> >> >
> >>
> >>
> >
> >
>
>


-- 
<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>

Re: Proglem generating resource: broken pipe

Posted by Matej Knopp <ma...@knopp.sk>.
What does the response header say?

Martijn Dashorst wrote:
> It is not a Jetty 5 specific bug, as in Jetty 6.0.1 I get this exception.
> 
> [2006-10-03 14:16:47,759] [btpool0-5] RequestCycle.step(1010) | method
> IResourceListener of interface wicket.IResourceListener targetted at
> component [MarkupContainer [Component id = aanmaken, page =
> nl.topicus.iridium.web.gui.financieel.incasso.IncassoRunTonenPage,
> path = 3:aanmaken.IncassoRunTonenPage$5, isVisible = true, isVersioned
> = false]] threw an exception
> 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 = 3: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:689)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>        at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
>        at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
>        at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
>        at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
>        at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149) 
> 
>        at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123) 
> 
>        at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
>        at org.mortbay.jetty.Server.handle(Server.java:269)
>        at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
>        at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687) 
> 
>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
>        at 
> org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
>        at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475) 
> 
> 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) 
> 
>        ... 25 more
> Caused by: wicket.WicketRuntimeException: Unable to render resource
> stream wicket.markup.html.DynamicWebResource$1@334d76
>        at wicket.Resource.respond(Resource.java:279)
>        at wicket.Resource.onResourceRequested(Resource.java:135)
>        at 
> wicket.markup.html.link.ResourceLink.onResourceRequested(ResourceLink.java:124) 
> 
>        ... 30 more
> Caused by: org.mortbay.jetty.EofException
>        at 
> org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:856)
>        at 
> org.mortbay.jetty.HttpGenerator$Output.flush(HttpGenerator.java:1069)
>        at 
> org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:764)
>        at wicket.Resource.respond(Resource.java:245)
>        ... 32 more
> Caused by: java.nio.channels.ClosedChannelException
>        at 
> sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:125)
>        at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java:323)
>        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:354)
>        at java.nio.channels.SocketChannel.write(SocketChannel.java:360)
>        at 
> org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:238)
>        at 
> org.mortbay.jetty.nio.HttpChannelEndPoint.flush(HttpChannelEndPoint.java:140) 
> 
>        at 
> org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:778)
>        ... 35 more
> 
> 
> On 10/3/06, Johan Compagner <jc...@gmail.com> wrote:
>> 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 <ma...@gmail.com> 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 <ma...@gmail.com> 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 wicket.markup.html.DynamicWebResource$1@1d66f1
>> > >         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>
>> >
>>
>>
> 
> 


Re: Re: Proglem generating resource: broken pipe

Posted by Martijn Dashorst <ma...@gmail.com>.
It is not a Jetty 5 specific bug, as in Jetty 6.0.1 I get this exception.

[2006-10-03 14:16:47,759] [btpool0-5] RequestCycle.step(1010) | method
IResourceListener of interface wicket.IResourceListener targetted at
component [MarkupContainer [Component id = aanmaken, page =
nl.topicus.iridium.web.gui.financieel.incasso.IncassoRunTonenPage,
path = 3:aanmaken.IncassoRunTonenPage$5, isVisible = true, isVersioned
= false]] threw an exception
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 = 3: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:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
        at org.mortbay.jetty.Server.handle(Server.java:269)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
        at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
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)
        ... 25 more
Caused by: wicket.WicketRuntimeException: Unable to render resource
stream wicket.markup.html.DynamicWebResource$1@334d76
        at wicket.Resource.respond(Resource.java:279)
        at wicket.Resource.onResourceRequested(Resource.java:135)
        at wicket.markup.html.link.ResourceLink.onResourceRequested(ResourceLink.java:124)
        ... 30 more
Caused by: org.mortbay.jetty.EofException
        at org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:856)
        at org.mortbay.jetty.HttpGenerator$Output.flush(HttpGenerator.java:1069)
        at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:764)
        at wicket.Resource.respond(Resource.java:245)
        ... 32 more
Caused by: java.nio.channels.ClosedChannelException
        at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:125)
        at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java:323)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:354)
        at java.nio.channels.SocketChannel.write(SocketChannel.java:360)
        at org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:238)
        at org.mortbay.jetty.nio.HttpChannelEndPoint.flush(HttpChannelEndPoint.java:140)
        at org.mortbay.jetty.HttpGenerator.flushBuffers(HttpGenerator.java:778)
        ... 35 more


On 10/3/06, Johan Compagner <jc...@gmail.com> wrote:
> 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 <ma...@gmail.com> 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 <ma...@gmail.com> 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 wicket.markup.html.DynamicWebResource$1@1d66f1
> > >         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>
> >
>
>


-- 
<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>

Re: Proglem generating resource: broken pipe

Posted by Johan Compagner <jc...@gmail.com>.
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 <ma...@gmail.com> 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 <ma...@gmail.com> 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 wicket.markup.html.DynamicWebResource$1@1d66f1
> >         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>
>

Re: Proglem generating resource: broken pipe

Posted by Martijn Dashorst <ma...@gmail.com>.
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 <ma...@gmail.com> 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 wicket.markup.html.DynamicWebResource$1@1d66f1
>         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>