java.lang.IllegalStateException: getOutputStream() has already been called for this response

JIRA | Andy Brook | 3 years ago
  1. 0

    Have seen this referred, not able to reproduce, logging for reference {noformat} /secure/admin/jemh/JEMHTestCas es!download.jspa [com.atlassian.velocity.DefaultVelocityManager] Exception getting message body from Velocity: java.lang.IllegalStateExc eption: getOutputStream() has already been called for this response java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:636) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:214) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at com.opensymphony.module.sitemesh.filter.PageResponseWrapper$5.activateDestination(PageResponseWrapper.java:96) at com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.getDestination(RoutablePrintWriter.java:43) at com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.write(RoutablePrintWriter.java:145) at org.apache.velocity.runtime.parser.node.ASTComment.render(ASTComment.java:103) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.Template.merge(Template.java:328) at org.apache.velocity.Template.merge(Template.java:235) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381) at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyImpl(DefaultVelocityManager.java:117) at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBody(DefaultVelocityManager.java:97) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplat ingEngine.java:148) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asHtml(DefaultVelocityTemplatingEng ine.java:136) <+4> (JiraVelocityViewDispatcher.java:50) (JiraWebworkViewDispatcher.java:110) (JiraWebworkViewDispatcher.java:69) ( {noformat}

    JIRA | 3 years ago | Andy Brook
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
  2. 0

    Have seen this referred, not able to reproduce, logging for reference {noformat} /secure/admin/jemh/JEMHTestCas es!download.jspa [com.atlassian.velocity.DefaultVelocityManager] Exception getting message body from Velocity: java.lang.IllegalStateExc eption: getOutputStream() has already been called for this response java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:636) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:214) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105) at com.opensymphony.module.sitemesh.filter.PageResponseWrapper$5.activateDestination(PageResponseWrapper.java:96) at com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.getDestination(RoutablePrintWriter.java:43) at com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.write(RoutablePrintWriter.java:145) at org.apache.velocity.runtime.parser.node.ASTComment.render(ASTComment.java:103) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.Template.merge(Template.java:328) at org.apache.velocity.Template.merge(Template.java:235) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381) at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyImpl(DefaultVelocityManager.java:117) at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBody(DefaultVelocityManager.java:97) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplat ingEngine.java:148) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asHtml(DefaultVelocityTemplatingEng ine.java:136) <+4> (JiraVelocityViewDispatcher.java:50) (JiraWebworkViewDispatcher.java:110) (JiraWebworkViewDispatcher.java:69) ( {noformat}

    JIRA | 3 years ago | Andy Brook
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
  3. 0

    [OFBIZ-1549] java.lang.IndexOutOfBoundsException in Invoice PDF - ASF JIRA

    apache.org | 1 year ago
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Long Pooling with 2.2.4 version not working

    GitHub | 2 years ago | karthikgaddam
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
  6. 0

    "getOutputStream() has already been called for this response" when tried to download generated file

    Stack Overflow | 3 years ago | Ricardo Giaviti
    java.lang.IllegalStateException: getOutputStream() has already been called for this response

  1. Bugger 1 times, last 7 months ago
  2. eilonreshef 1 times, last 9 months ago
  3. Piz 24 times, last 4 months ago
  4. mortalman7 10 times, last 6 months ago
39 unregistered visitors
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

    getOutputStream() has already been called for this response

    at org.apache.catalina.connector.Response.getWriter()
  2. Glassfish Core
    ResponseFacade.getWriter
    1. org.apache.catalina.connector.Response.getWriter(Response.java:636)
    2. org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:214)
    2 frames
  3. JavaServlet
    ServletResponseWrapper.getWriter
    1. javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105)
    2. javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105)
    3. javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105)
    4. javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105)
    5. javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105)
    5 frames
  4. Sitemesh
    RoutablePrintWriter.write
    1. com.opensymphony.module.sitemesh.filter.PageResponseWrapper$5.activateDestination(PageResponseWrapper.java:96)
    2. com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.getDestination(RoutablePrintWriter.java:43)
    3. com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.write(RoutablePrintWriter.java:145)
    3 frames
  5. Apache Velocity
    VelocityEngine.mergeTemplate
    1. org.apache.velocity.runtime.parser.node.ASTComment.render(ASTComment.java:103)
    2. org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
    3. org.apache.velocity.Template.merge(Template.java:328)
    4. org.apache.velocity.Template.merge(Template.java:235)
    5. org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
    5 frames
  6. com.atlassian.velocity
    DefaultVelocityManager.writeEncodedBody
    1. com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyImpl(DefaultVelocityManager.java:117)
    2. com.atlassian.velocity.DefaultVelocityManager.writeEncodedBody(DefaultVelocityManager.java:97)
    2 frames