Hi all, Thanks Zohar for reporting this issue. Looking at the code, it seems that we are closing the output stream too early in the FreemarkerRepresentation, causing Simple to fail when it's trying to also close the stream. I think I've solved it by removing the first "close". The fix will be part of the next beta 19 snapshot due today.
Zohar, AJ, could you test this fix and let me know if it work fine with STaX and FreeMarker? Best regards, Jerome > -----Message d'origine----- > De : A.J. Barnes [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 20 octobre 2006 00:37 > À : [email protected] > Objet : Re: Bug in TemplateRepresentation? > > Hi, > > This only seems to happen with Simple - either of the Jetty > servers seem > fine - just thought it was my bad code. Note that its not just > TemplateRepresentations either, I've rolled my own STaX (Woodstox) > representation and this fell over with Simple. > > AJ > > Quoting Zohar Melamed <[EMAIL PROTECTED]>: > > > Hi > > I have a simple app with a single restlet using the > > TemplateRepresentation. > > On every request I get : > > INFO: Error while handling an HTTP server call > > java.io.IOException: Stream closed > > at simple.http.ResponseStream.ensureOpen(Unknown Source) > > at simple.http.ResponseStream.flushBuffer(Unknown Source) > > at simple.http.ResponseStream.flush(Unknown Source) > > at > > com.noelios.restlet.connector.AbstractHttpServerCall. > > sendResponseOutput(AbstractHttpServerCall.java:268) > > at > > com.noelios.restlet.connector. > > AbstractHttpServer.handle(AbstractHttpServer.java:131) > > at > > com.noelios.restlet.connector.AbstractHttpServer. > > handle(AbstractHttpServer.java:106) > > ... > > ... > > .. > > > > Looking at the code , I suspect the TemplateRepresentation > class closes > > the > > connection, and AbstractHttpServerCall then tries to flush it... > > > > any thoughts? > > > > Cheers > > Zohar > > > > > > > -- > A.J. Barnes, B.Sc., B.N. > Poisons Information Officer > National Poisons Centre / Te Kaunuku Paitini O Aotearoa > > Ph: +64 3 479 7250 > Fax: +64 3 477 0509 > > ======================================================= > > CAUTION: This e-mail message may contain information that is > confidential > and subject to privilege. It is intended solely for the addressee. If > you > are not the intended recipient, you are notified that any use, > distribution > or copying of this message or data is prohibited. If you > received this > e-mail in error, please notify me immediately and delete all material > pertaining to this e-mail. Thank you. > >

