Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 33776 invoked from network); 8 Oct 2009 22:13:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Oct 2009 22:13:58 -0000 Received: (qmail 78546 invoked by uid 500); 8 Oct 2009 22:13:57 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 78446 invoked by uid 500); 8 Oct 2009 22:13:57 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 78436 invoked by uid 99); 8 Oct 2009 22:13:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 22:13:57 +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 niall.pemberton@gmail.com designates 209.85.211.174 as permitted sender) Received: from [209.85.211.174] (HELO mail-yw0-f174.google.com) (209.85.211.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 22:13:48 +0000 Received: by ywh4 with SMTP id 4so1603304ywh.10 for ; Thu, 08 Oct 2009 15:13:27 -0700 (PDT) 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=pn2wKz+kIMrFN2zOXCo67ajy5CC0E2anZR6wJwdJ4vY=; b=jL4mLB6mq7E543VX+bHKPBUSb9bHVQV2i+YnF1gk/kTCAEGwVIcRNM7FtN8m9Bf98b GicfR5YfxgHtTRb4lJ4uhrBd67u1vIUZpuSrCowBJfRjMSxhHlqu5zCxqroeZkh51aQZ 9T6qpP68MglexZvoF3z2L7sgc+y0EZpuSFwVI= 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=e4eQiI+ZEsisUWpbaeA+Tonafgc3iiYSaeL6zDiVwXd1lVD/VXJD4w6hHXDJcpN1ZK QrkwLfujwb28N+I5u/7QAL0CTqRhWpySm9n6cpp7kLk0nMuneJ0y/PTf2GKkipXhYNaq fVDcCE0epV1ELbOIN6a5s9tKXh5GWejVETg6w= MIME-Version: 1.0 Received: by 10.101.92.11 with SMTP id u11mr1999044anl.126.1255040007235; Thu, 08 Oct 2009 15:13:27 -0700 (PDT) In-Reply-To: <25804929.post@talk.nabble.com> References: <25804929.post@talk.nabble.com> Date: Thu, 8 Oct 2009 23:13:27 +0100 Message-ID: <55afdc850910081513g288b7326t88af80fea568964@mail.gmail.com> Subject: Re: NPE from DBCP connection pool From: Niall Pemberton To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Oct 8, 2009 at 8:16 PM, TomStrummer wrote: > > Anyone ever seen this before? =A0A NPE from PoolingConnection.normalizeSQ= L: > >> java.lang.NullPointerException >> =A0 =A0 =A0 =A0 at >> org.apache.commons.dbcp.PoolingConnection.normalizeSQL(PoolingConnection= .java:178) >> =A0 =A0 =A0 =A0 at >> org.apache.commons.dbcp.PoolingConnection.createKey(PoolingConnection.ja= va:170) >> =A0 =A0 =A0 =A0 at >> org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnec= tion.java:92) >> =A0 =A0 =A0 =A0 at >> org.apache.commons.dbcp.DelegatingConnection.prepareStatement(Delegating= Connection.java:248) >> =A0 =A0 =A0 =A0 at >> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.pre= pareStatement(PoolingDataSource.java:302) >> > > I've got a BasicDataSource and I'm trying to run a relatively simple quer= y. > Not sure where the NPE could be coming from. =A0The SQL statement in ques= tion > is extremely simple, a single-column SELECT with a single JOIN and a WHER= E > clause. =A0It works fine in a SQL browser. =A0The query is Oracle 11g, bu= t I'm > pretty sure that doesn't matter since it doesn't look like the query is > getting that far. The sql statement you're passing in has got to be null since the normalizeSQL() method only does sql.trim(). Also it would make investigation issues much easier if you specify the version of DBCP you are using. Niall > Note that other queries still work, just this one in particular. =A0So it= 's > not an issue with connections closing or something like that. =A0Any idea= s? > > Thanks. > -Tom > -- --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org