java.lang.IllegalStateException: Cannot call getOutputStream() after getWriter()

Atlassian JIRA | ATOS Origin SDMC OM Beheer | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    For some of our projects no e-mail is sent (for example upon creating a new issue). The projects in question have the default notification scheme and also the default mail configuration. In all respects those settings are identical to the projects for which e-mail is sent. In the application.log I find IllegalSateExceptions at these times (flush mail queue after creating issue, with a tail on the application.log): 05/07/26 10:47:02 atlassian-jira-web: Servlet error java.lang.IllegalStateException: Cannot call getOutputStream() after getWriter() at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getPageOutputStream(PageResponseWrapper.java:174) at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getOutputStream(PageResponseWrapper.java:166) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:263) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:255) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:168) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132) at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:37) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534)

    Atlassian JIRA | 1 decade ago | ATOS Origin SDMC OM Beheer
    java.lang.IllegalStateException: Cannot call getOutputStream() after getWriter()
  2. 0

    For some of our projects no e-mail is sent (for example upon creating a new issue). The projects in question have the default notification scheme and also the default mail configuration. In all respects those settings are identical to the projects for which e-mail is sent. In the application.log I find IllegalSateExceptions at these times (flush mail queue after creating issue, with a tail on the application.log): 05/07/26 10:47:02 atlassian-jira-web: Servlet error java.lang.IllegalStateException: Cannot call getOutputStream() after getWriter() at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getPageOutputStream(PageResponseWrapper.java:174) at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getOutputStream(PageResponseWrapper.java:166) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:263) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:255) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:168) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132) at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:37) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534)

    Atlassian JIRA | 1 decade ago | ATOS Origin SDMC OM Beheer
    java.lang.IllegalStateException: Cannot call getOutputStream() after getWriter()

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Cannot call getOutputStream() after getWriter()

      at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getPageOutputStream()
    2. Sitemesh
      PageResponseWrapper.getOutputStream
      1. com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getPageOutputStream(PageResponseWrapper.java:174)
      2. com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getOutputStream(PageResponseWrapper.java:166)
      2 frames