I was recently working on an application that was using version 1.1 dbcp. On first trial we upgraded to 1.4 and there were no change needed at all. It worked out of box. And after sometime we upgraded to commons-dbcp 2.1. For this we needed some changes.
maxActive has changed to maxTotal maxWait has changed to maxWaitMillis
When I did the above changes, I started to get the below error:
java.sql.SQLException: Cannot create PoolableConnectionFactory (Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented.)
So this error indicated that something is wrong with the database driver. So the next thing was to update the jdbc drive. Since we are using postgres, java7 and tomcat7, we changed the driver to 9.4-1206-jdbc41
That was it, and the application started working as it was before.