Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 601BB926E for ; Tue, 4 Oct 2011 00:30:24 +0000 (UTC) Received: (qmail 55325 invoked by uid 500); 4 Oct 2011 00:30:21 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 55144 invoked by uid 500); 4 Oct 2011 00:30:20 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 55135 invoked by uid 99); 4 Oct 2011 00:30:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 00:30:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of knst.kolinko@gmail.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vw0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 00:30:14 +0000 Received: by vws17 with SMTP id 17so4975239vws.18 for ; Mon, 03 Oct 2011 17:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=X6Uy4BzPTgASBpZCFJt8Ol80nujYWRjUfVH6FHHiES0=; b=PKu75FY4YogAU3cQNneIsCRX3yOfraaqFzx4EW6Y4ziOei3hHJe7LkOmlCkXgsAJKa +UyRqw5sDrTsSTWG5pu2EhyM9wO0I9FnuEhY0MxXunjT34ompkuKIC8tkr04zTuJ4PfQ nCNSvBeYE903aXvLCfHwCtSEJ8QptWnYa56hE= MIME-Version: 1.0 Received: by 10.52.188.101 with SMTP id fz5mr624118vdc.201.1317688193561; Mon, 03 Oct 2011 17:29:53 -0700 (PDT) Received: by 10.52.183.193 with HTTP; Mon, 3 Oct 2011 17:29:53 -0700 (PDT) In-Reply-To: <018EE451-AEE5-4EC0-ADC2-53D77775D448@cdw.com> References: <018EE451-AEE5-4EC0-ADC2-53D77775D448@cdw.com> Date: Tue, 4 Oct 2011 04:29:53 +0400 Message-ID: Subject: Re: IllegalStateException using CompressionFilter with Tomcat 7.0.21/22 From: Konstantin Kolinko To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 2011/10/4 Kari Scott : > SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw= exception [java.lang.IllegalStateException: getWriter() has already been c= alled for this response] with root cause > java.lang.IllegalStateException: getWriter() has already been called for = this response > =A0 =A0 =A0 =A0at org.apache.catalina.connector.Response.getOutputStream(= Response.java:594) > =A0 =A0 =A0 =A0at org.apache.catalina.connector.ResponseFacade.getOutputS= tream(ResponseFacade.java:199) > =A0 =A0 =A0 =A0at com.tirerack.filters.CompressionResponseStream.(C= ompressionResponseStream.java:47) > =A0 =A0 =A0 =A0at com.tirerack.filters.CompressionServletResponseWrapper.= createOutputStream(CompressionServletResponseWrapper.java:172) > =A0 =A0 =A0 =A0at com.tirerack.filters.CompressionServletResponseWrapper.= getWriter(CompressionServletResponseWrapper.java:250) > =A0 =A0 =A0 =A0at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWrit= erImpl.java:125) > =A0 =A0 =A0 =A0at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(Jsp= WriterImpl.java:118) > =A0 =A0 =A0 =A0at org.apache.jasper.runtime.PageContextImpl.release(PageC= ontextImpl.java:190) > =A0 =A0 =A0 =A0at org.apache.jasper.runtime.JspFactoryImpl.internalReleas= ePageContext(JspFactoryImpl.java:123) > =A0 =A0 =A0 =A0at org.apache.jasper.runtime.JspFactoryImpl.releasePageCon= text(JspFactoryImpl.java:80) > =A0 =A0 =A0 =A0at org.apache.jsp.upgrade_005fgarage.SetCurrentVehicle_jsp= ._jspService(SetCurrentVehicle_jsp.java:278) > > The above stack trace is quite odd. JspWriterImpl calls getWriter(), but CompressionServletResponseWrapper implements it as a call to createOutputStream(), but that fails because, well, you have already called getWriter(). It feels like there is some bug there, but I would like a more simple examp= le. I think it is OK to open an issue in Bugzilla, but please attach an example (with source code) that reproduces this. I think a lot depends on the state of JspWriterImpl when PageContextImpl.release() is called. I think it should be empty at that point, but it is not. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org