File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Closing the Buffer error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Closing the Buffer error" Watch "Closing the Buffer error" New topic
Author

Closing the Buffer error

chaitanya krish
Greenhorn

Joined: Apr 24, 2012
Posts: 8
Hi,
I am working on apache wicket framework. My requirement is I want to generate the csv file whenever i click the download button. I generated the csv file, there is no problem getting the csv file in client side . but after downloading , i got the following error in the log file. Can anyone please tell me what is the solution not getting that error in log file


WicketFilter [ERROR] closing the buffer error
java.lang.IllegalStateException: STREAM
at org.mortbay.jetty.Response.getWriter(Response.java:616)
at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:429)
at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:74)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:502)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
at com.radiantexp.astro.client.nebula.filter.AstroFilter.doFilter(AstroFilter.java:22)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)



small snippet of code
setRedirect(false);
WebResponse response = (WebResponse) getResponse();
response.setAttachmentHeader("export.csv");
response.setContentType("text/csv");
OutputStream outputStream = response.getOutputStream();
OutputStreamWriter writer = new OutputStreamWriter(outputStream);

 
 
subject: Closing the Buffer error
 
Similar Threads
Problem with Ext - GWT and hibernate (without Spring)
Error starting Applikation in Eclipse Developer Mode
Saving a file under my GWT project's '/war' path - Security Exception
JSP error
NullPointerException