title: java.lang.IllegalStateException at production site
body: <p>I am getting below exception at production site.</p>
  
  <pre><code>    SEVERE: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException
  at com.liferay.portal.servlet.filters.gzip.GZipResponse.getWriter(GZipResponse.java:122)
  at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105)
  at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
  at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:221)
  at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:297)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
  at com.liferay.portal.struts.StrutsUtil.forward(StrutsUtil.java:79)
  at com.liferay.portal.struts.PortalRequestProcessor.doForward(PortalRequestProcessor.java:282)
  at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
  at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
  at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
  at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:176)
  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
  at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:560)
  at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:537)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
  at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
  at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
  at com.liferay.portal.util.PortalImpl.sendError(PortalImpl.java:5384)
  at com.liferay.portal.util.PortalImpl.sendError(PortalImpl.java:5265)
  at com.liferay.portal.util.PortalUtil.sendError(PortalUtil.java:1609)
  at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:749)
  at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:249)
  at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
  at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:176)
  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
  at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:560)
  at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:537)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
  at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
  at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
  at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:138)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
  at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
  at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
  at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
  at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
  at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
  at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
  at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:56)
  at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
  at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:246)
  at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
  at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:306)
  at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
  at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
  at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  
  at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>Fist our assumption was it is taking heavy time to load the data so we got this exception.
  For replicating the exception I took database dump of production site and point it to local environment. But I am not able to reproduce it. WE are using Vaadin with liferay 6.1. </p>
  
  <p>What should be the reason behind getting exception in production site only. </p>
  
  <p>P.S : Production and local environment is identical. </p>