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

Atlassian JIRA | ATOS Origin SDMC OM Beheer | 1 decade ago
  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()
  3. 0

    Copy a file to folder from another folder using JSP

    Stack Overflow | 2 years ago
    java.lang.IllegalStateException: strict servlet API: cannot call getOutputStream() after getWriter()
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    XML engine troubleshooting

    Oracle Community | 5 years ago | yithzak
    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()
  6. 0

    i am migrating my website based on jsf myfaces from JOnAS to WebLogic 8.1 sp 5 and i have still this issue : i have downloaded the latest snapshot myfaces-core-1.1.4-snapshot tomahawk-1.1.3-snapshot java.lang.IllegalStateException: strict servlet API: cannot call getOutputStream() after getWriter() at weblogic.servlet.internal.ServletResponseImpl.getOutputStream(ServletResponseImpl.java:162) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:176) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at simpa.web.utils.AuthorizationFilter.doFilter(AuthorizationFilter.java:58) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) it is critical for us as the experimentation should start next week thanks in advance Bruno

    Apache's JIRA Issue Tracker | 1 decade ago | Bruno
    java.lang.IllegalStateException: strict servlet API: cannot call getOutputStream() after getWriter()

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    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