I have a
JSP which access a big collection (it has about 250 objects, containing 2 Strings attributes each). After this collection, the JSP accesses few other collections (very small ones).
I get the below Buffer error while trying to access these small collections at the end of the page.
Can someone please suggest how to fix this?
<h1>Error: 500</h1>
<b>Internal
Servlet Error:</b><br>
<pre>
javax.servlet.ServletException: Error: Attempt to clear a buffer that's already been flushed
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java, Compiled Code)
at com.ge.appl.tsf.shells.web.TSFUrlHandler.forward(TSFUrlHandler.java, Compiled Code)
at com.ge.appl.tsf.shells.web.TSFWebPresentationManager.render(TSFWebPresentationManager.java, Compiled Code)
at com.ge.appl.tsf.shells.web.TSFDispatcher.service(TSFDispatcher.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.Context.handleRequest(Context.java, Compiled Code)
at org.enhydra.servlet.servletManager.ServletManager.service(ServletManager.java, Compiled Code)
at org.enhydra.servlet.connectionMethods.http.HttpHandler.doARequest(HttpHandler.java, Compiled Code)
at org.enhydra.servlet.connectionMethods.http.HttpHandler.processRequests(HttpHandler.java, Compiled Code)
at org.enhydra.servlet.connectionMethods.http.HttpHandler.run(HttpHandler.java, Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)
</pre>
<b>Root cause:</b>
<pre>
java.io.IOException: Error: Attempt to clear a buffer that's already been flushed
at org.apache.jasper.runtime.JspWriterImpl.clear(JspWriterImpl.java, Compiled Code)
at jsp.temp._0002fjsp_0002ftemp_0002fadmin_0002ejspadmin_jsp_1._jspService(_0002fjsp_0002ftemp_0002fadmin_0002ejspadmin_jsp_1.java, Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java, Compiled Code)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java, Compiled Code)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java, Compiled Code)
at com.ge.appl.tsf.shells.web.TSFUrlHandler.forward(TSFUrlHandler.java, Compiled Code)
at com.ge.appl.tsf.shells.web.TSFWebPresentationManager.render(TSFWebPresentationManager.java, Compiled Code)
at com.ge.appl.tsf.shells.web.TSFDispatcher.service(TSFDispatcher.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.Context.handleRequest(Context.java, Compiled Code)
at org.enhydra.servlet.servletManager.ServletManager.service(ServletManager.java, Compiled Code)
at org.enhydra.servlet.connectionMethods.http.HttpHandler.doARequest(HttpHandler.java, Compiled Code)
at org.enhydra.servlet.connectionMethods.http.HttpHandler.processRequests(HttpHandler.java, Compiled Code)
at org.enhydra.servlet.connectionMethods.http.HttpHandler.run(HttpHandler.java, Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)
</pre>