java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • A {{RuntimeException}} is thrown inside {{HttpResponseRenderer}}. Rather than printing this stack trace to the log, I get {code:none} [ERROR] /jenkins/$stapler/bound/db022930-dbbe-4ded-8c68-8690f97920f3/stuff java.lang.IllegalStateException: WRITER at org.mortbay.jetty.Response.getOutputStream(Response.java:531) at javax.servlet.ServletResponseWrapper.getOutputStream(ServletResponseWrapper.java:112) at org.kohsuke.stapler.compression.CompressionServletResponse.activateCompressionIfNecessary(CompressionServletResponse.java:44) at org.kohsuke.stapler.compression.CompressionServletResponse.setHeader(CompressionServletResponse.java:31) at javax.servlet.http.HttpServletResponseWrapper.setHeader(HttpServletResponseWrapper.java:160) at org.kohsuke.stapler.ResponseImpl.getCompressedOutputStream(ResponseImpl.java:278) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.createOutputStream(DefaultScriptInvoker.java:88) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.createXMLOutput(DefaultScriptInvoker.java:68) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:51) at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631) at hudson.init.impl.InstallUncaughtExceptionHandler$1.reportException(InstallUncaughtExceptionHandler.java:27) at org.kohsuke.stapler.compression.CompressionFilter.reportException(CompressionFilter.java:63) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:58) at ... {code} which is not exactly helpful. It seems that {{rsp.getWriter()}} has already been called, and Jetty correctly rejects the attempt to call {{rsp.setHeader("Content-Encoding","gzip")}}.
    via by Jesse Glick,
  • A {{RuntimeException}} is thrown inside {{HttpResponseRenderer}}. Rather than printing this stack trace to the log, I get {code:none} [ERROR] /jenkins/$stapler/bound/db022930-dbbe-4ded-8c68-8690f97920f3/stuff java.lang.IllegalStateException: WRITER at org.mortbay.jetty.Response.getOutputStream(Response.java:531) at javax.servlet.ServletResponseWrapper.getOutputStream(ServletResponseWrapper.java:112) at org.kohsuke.stapler.compression.CompressionServletResponse.activateCompressionIfNecessary(CompressionServletResponse.java:44) at org.kohsuke.stapler.compression.CompressionServletResponse.setHeader(CompressionServletResponse.java:31) at javax.servlet.http.HttpServletResponseWrapper.setHeader(HttpServletResponseWrapper.java:160) at org.kohsuke.stapler.ResponseImpl.getCompressedOutputStream(ResponseImpl.java:278) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.createOutputStream(DefaultScriptInvoker.java:88) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.createXMLOutput(DefaultScriptInvoker.java:68) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:51) at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631) at hudson.init.impl.InstallUncaughtExceptionHandler$1.reportException(InstallUncaughtExceptionHandler.java:27) at org.kohsuke.stapler.compression.CompressionFilter.reportException(CompressionFilter.java:63) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:58) at ... {code} which is not exactly helpful. It seems that {{rsp.getWriter()}} has already been called, and Jetty correctly rejects the attempt to call {{rsp.setHeader("Content-Encoding","gzip")}}.
    via by Jesse Glick,
  • GAE throws IllegalStateException: WRITER
    via Stack Overflow by Igor Artamonov
    ,
  • Serve image from blob store
    via by Ahmed Shoeib,
  • Serve image from blob store
    via by Ahmed Shoeib,
  • Serve image from blob store
    via by Ahmed Shoeib,
    • java.lang.IllegalStateException: WRITER at org.mortbay.jetty.Response.getOutputStream(Response.java:531) at javax.servlet.ServletResponseWrapper.getOutputStream(ServletResponseWrapper.java:112) at org.kohsuke.stapler.compression.CompressionServletResponse.activateCompressionIfNecessary(CompressionServletResponse.java:44) at org.kohsuke.stapler.compression.CompressionServletResponse.setHeader(CompressionServletResponse.java:31) at javax.servlet.http.HttpServletResponseWrapper.setHeader(HttpServletResponseWrapper.java:160) at org.kohsuke.stapler.ResponseImpl.getCompressedOutputStream(ResponseImpl.java:278) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.createOutputStream(DefaultScriptInvoker.java:88) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.createXMLOutput(DefaultScriptInvoker.java:68) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:51) at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631) at hudson.init.impl.InstallUncaughtExceptionHandler$1.reportException(InstallUncaughtExceptionHandler.java:27) at org.kohsuke.stapler.compression.CompressionFilter.reportException(CompressionFilter.java:63) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:58)
    No Bugmate found.