I\'m trying to set up a JDBC DataSource in Tomcat 7 under Ubuntu 12.X, so I added the following to the context.xml file:
If you don't feel like patching tomcat you can (on CentOS) also add the following to the JAVA_OPTS (e.g. by adding it in /usr/share/tomcat/conf/context.xml
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"