Yup - its a problem. The following classes have this problem because getResultSet() doesn't check for a null return. - DelegatingPreparedStatement - DelegatingCallableStatement - DelegatingPreparedStatement
I just submitted a bug report and patch to fix this. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12733 Andy Olliver wrote: > DBCP v1.0 > I have had to make a quick fix to DelegatingResultSet to fix a problem. > It is the 'wrong fix' but it keeps things working for me, until I have the > correct fix. > > I use a connection to execute a query that returns no resultset, however I > still get a non-null DelegatingResltSet returned, containing a null > resultset as instance variable '_res'. > > Calling .close() throws a NullPointerException, however as a 'user' of the > datasource there is no way of checking the state of private variabe '_res'. > > I have added a check to the close method: > > if (_res != null) _res.close; > > But actually the DelegatingResultSet should never be created in the first > place, the stmt.execute() method should just return null. > > bests > > Andy > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002 > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>