commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TomStrummer <>
Subject NPE from DBCP connection pool
Date Thu, 08 Oct 2009 19:16:19 GMT

Anyone ever seen this before?  A NPE from PoolingConnection.normalizeSQL:

> java.lang.NullPointerException
>         at
> org.apache.commons.dbcp.PoolingConnection.normalizeSQL(
>         at
> org.apache.commons.dbcp.PoolingConnection.createKey(
>         at
> org.apache.commons.dbcp.PoolingConnection.prepareStatement(
>         at
> org.apache.commons.dbcp.DelegatingConnection.prepareStatement(
>         at
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(

I've got a BasicDataSource and I'm trying to run a relatively simple query. 
Not sure where the NPE could be coming from.  The SQL statement in question
is extremely simple, a single-column SELECT with a single JOIN and a WHERE
clause.  It works fine in a SQL browser.  The query is Oracle 11g, but I'm
pretty sure that doesn't matter since it doesn't look like the query is
getting that far.

Note that other queries still work, just this one in particular.  So it's
not an issue with connections closing or something like that.  Any ideas?

View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message