commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan" <>
Subject Problem with Result Set returning null instead of Empty String
Date Wed, 25 Jan 2006 09:49:37 GMT

I have a web application running on Tomcat 4.0. In it i have implemented by
own Connection Pool. Now im trying to use the DBCP connection broker to
handle message pools. I have managed in doing so but ther's just one

Earlier in my code, whenever i was doing a resultSet.getString('some column
name'), the return value would be an empty string ('') in case the column in
the database was null. However, after using DBCP, similar statements return
null and since in a lot of places, i have done operations such as trim() etc
on these returned Strings, i am getting null pointer exceptions all over the

Is there any way by which i could make the DBCP connection broker return an
empty string instead of a null so that i dont need to make changes in
numerous places in my application to handle the null pointer case ?

Thanks and Regards,

Chetan Arora

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message