cancel
Showing results for 
Search instead for 
Did you mean: 

getOutputStream() has already been called for this response

edgar
Champ in-the-making
Champ in-the-making
Hi,

I have a 404 error page defined in my Web Project's web.xml:


<error-page>
      <error-code>404</error-code>
      <location>/service/404.jsp</location>
</error-page>

When I request a non-existing page in the Virtualization Server I get Tomcat's default 404 page (not my 404 page) and I see the following error in the Alfresco log file:


Jul 31, 2007 10:04:25 PM org.apache.catalina.core.StandardHostValve custom
SEVERE: Exception Processing ErrorPage[errorCode=404, location=/service/404.jsp]                                  
org.apache.jasper.JasperException: getOutputStream() has already been called for this response                               at
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)                        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:383)                                   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)                                          at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)                                                 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)                                                      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)                 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)                         at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)                             at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)                     at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)                          at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)                            at
org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:364)                                     at
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:285)                                     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)                                     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)                                     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)                                 at
org.alfresco.catalina.valve.AVMUrlValve.invoke(AVMUrlValve.java:375)                                              at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)                                       at
org.alfresco.catalina.valve.AVMUrlValve.invoke(AVMUrlValve.java:718)                                     

It seems that the Alfresco Virtualization Server sits between Tomcat and the virtual web app and wants to be in charge of the response and does not expect that the web app wants to write out the response?

I see similar behavior for my custom Spring-based form (not an Alfresco Web Form).

Any ideas on how to avoid this?

regards,

Edgar
2 REPLIES 2

camozzi
Champ in-the-making
Champ in-the-making
* Bump *

I am experiencing this exact issue as well. Does anyone have some feedback or a link to a resource / thread that might help resolve this issue?

Thanks!

-Jeff

samuel_penn
Champ in-the-making
Champ in-the-making
Just to add another voice to this. Our 404 handler works fine in the published version of the web site, but gives the above error in the virtual server when the site is previewed. Does anybody have a work around or a solution?

Sam.