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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via JIRA by Andy Brook, 1 year ago
getOutputStream() has already been called for this response
via JIRA by Andy Brook, 1 year ago
getOutputStream() has already been called for this response
via coderanch.com by Unknown author, 1 year ago
getOutputStream() has already been called for this response
via Coderanch by mo sayed, 11 months ago
getOutputStream() has already been called for this response
via Stack Overflow by Adam
, 2 years ago
getOutputStream() has already been called for this response
via Stack Overflow by vauge
, 2 years ago
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 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 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 com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyImpl(DefaultVelocityManager.java:117)
at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBody(DefaultVelocityManager.java:97)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
4 times, 4 months ago
40 times, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.