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 [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)
       ... 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 <[EMAIL PROTECTED]> 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 <[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>
>





Reply via email to