Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 13453 invoked from network); 26 Jan 2010 06:57:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jan 2010 06:57:03 -0000 Received: (qmail 62493 invoked by uid 500); 26 Jan 2010 06:57:03 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 62005 invoked by uid 500); 26 Jan 2010 06:57:01 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 61997 invoked by uid 99); 26 Jan 2010 06:57:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2010 06:57:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jgawor@gmail.com designates 209.85.222.194 as permitted sender) Received: from [209.85.222.194] (HELO mail-pz0-f194.google.com) (209.85.222.194) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2010 06:56:50 +0000 Received: by pzk32 with SMTP id 32so1100400pzk.27 for ; Mon, 25 Jan 2010 22:56:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=9QtGQQEbFF7OlFqGS3QBKZmtF5hU3rFa5kIXCitd4kw=; b=d81fq0aAR5Q0ilqxcx7bWU2lm4nVUIi++KVxzgZRMkIT0vnsBONZeKjP7EOzkNtu+U q7wwFOL6DL8ccgek2zDx1owyvB/nJY5AikzV9/c2/iYQagImwVb4J/QGBN/hTV/s8nt0 RmIydnxxKy53uuXXKWnfghzcR+SRuktg8A5fs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=uLj5f14ApEpLBrIxP6HTov5lSRTTd5pMybt7/aqYnMz2EIUigoJS42t06QZImBKd0+ 08X0aGphG4YTPe/MOeHgKur05IuSn41Zae7F4qfp44G9yEJXxyJiBFj1iKN/KMMfiD0P sVd98liUgMTis39XRyPAd52wbRHdp0Wc9Q/A8= MIME-Version: 1.0 Received: by 10.114.163.19 with SMTP id l19mr3013111wae.170.1264488988863; Mon, 25 Jan 2010 22:56:28 -0800 (PST) In-Reply-To: <5eb405c71001252135q6bc73c65wa6e320d692b07889@mail.gmail.com> References: <5eb405c71001252135q6bc73c65wa6e320d692b07889@mail.gmail.com> Date: Tue, 26 Jan 2010 01:56:28 -0500 Message-ID: <5eb405c71001252256m3bac9c11k5e901ac01e75effe@mail.gmail.com> Subject: Re: NPE on Jetty From: Jarek Gawor To: dev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Seems like the problem might be caused by URLResource.exists() calls as the change in revision 903093 makes these NPEs disappear. Jarek On Tue, Jan 26, 2010 at 12:35 AM, Jarek Gawor wrote: > Hi, > > While testing some web applications on Jetty very quickly I ran into > the following NPE (while accessing some jsps): > > java.lang.NullPointerException > =A0 =A0 =A0 =A0at java.util.zip.Inflater.ensureOpen(Inflater.java:336) > =A0 =A0 =A0 =A0at java.util.zip.Inflater.getBytesWritten(Inflater.java:29= 6) > =A0 =A0 =A0 =A0at java.util.zip.ZipFile$1.available(ZipFile.java:243) > =A0 =A0 =A0 =A0at org.apache.felix.framework.URLHandlersBundleURLConnecti= on.connect(URLHandlersBundleURLConnection.java:125) > =A0 =A0 =A0 =A0at org.apache.felix.framework.URLHandlersBundleURLConnecti= on.getInputStream(URLHandlersBundleURLConnection.java:134) > =A0 =A0 =A0 =A0at org.eclipse.jetty.util.resource.URLResource.exists(URLR= esource.java:102) > =A0 =A0 =A0 =A0at org.eclipse.jetty.server.handler.ContextHandler$Context= .getResource(ContextHandler.java:1623) > =A0 =A0 =A0 =A0at org.apache.jasper.servlet.JspServlet.serviceJspFile(Jsp= Servlet.java:306) > =A0 =A0 =A0 =A0at org.apache.jasper.servlet.JspServlet.service(JspServlet= .java:265) > =A0 =A0 =A0 =A0at javax.servlet.http.HttpServlet.service(HttpServlet.java= :668) > =A0 =A0 =A0 =A0at org.eclipse.jetty.servlet.ServletHolder.handle(ServletH= older.java:532) > =A0 =A0 =A0 =A0at org.eclipse.jetty.servlet.ServletHandler.doHandle(Servl= etHandler.java:454) > =A0 =A0 =A0 =A0at org.eclipse.jetty.server.handler.ScopedHandler.handle(S= copedHandler.java:119) > =A0 =A0 =A0 =A0at org.eclipse.jetty.server.session.SessionHandler.handle(= SessionHandler.java:186) > =A0 =A0 =A0 =A0at org.eclipse.jetty.server.handler.ContextHandler.doHandl= e(ContextHandler.java:942) > =A0 =A0 =A0 =A0at org.eclipse.jetty.servlet.ServletHandler.doScope(Servle= tHandler.java:389) > =A0 =A0 =A0 =A0at org.eclipse.jetty.server.handler.ContextHandler.doScope= (ContextHandler.java:876) > =A0 =A0 =A0 =A0at org.apache.geronimo.jetty8.handler.GeronimoWebAppContex= t.doScope(GeronimoWebAppContext.java:115) > =A0 =A0 =A0 =A0at org.eclipse.jetty.server.handler.ScopedHandler.handle(S= copedHandler.java:117) > =A0 =A0 =A0 =A0at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.= java:172) > > After googling a bit I found the following bug reports: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D193269 and > https://issues.apache.org/jira/browse/FELIX-1032. Looks like a JRE bug > but maybe we can prevent this problem by patching Jetty (by closing > the inputstreams) ? > > Jarek >