Possible Duplicate:
ClassCastException DataSource cannot be cast to javax.sql.ConnectionPoolDataSource
How to make tomcat-jdbc.jar work with Tomcat 6?
We have an application that was designed to be deployed in Tomcat 6 however due to fixes we did, we needed to put JDBC pool codes, that I believe only works with Tomcat 7? Since tomcat 6 is already in our production server, I may need to make JDBC pool work with Tomcat 6?
*I was doing my local development for our application and use Tomcat7 for debugging, that I forgot that we use Tomcat6 in production**
Update:
When I run in tomcat 6 I get this exception:
java.lang.ClassCastException: org.apache.tomcat.jdbc.pool.DataSource cannot be cast to javax.sql.ConnectionPoolDataSource
When it works without problems in Tomcat7…
This is fairly easy, I am running Tomcat JDBC for more than a year now on Tomcat 6. Configure it as you would configure a normal
DataSourcebut put the JAR in Tomcat’slibdir and add thefactoryattribute with the valueorg.apache.tomcat.jdbc.pool.DataSourceFactoryto yourResourceelement.Off topic: Just a tip, always use the same Tomcat version for testing as you would use for production.