Tomcat 7 JDBC Connection Pooler Configuration

Standard

Tomcat 7.0.40 has a issue running the standard connection pooler. Following the Apache tutorial can lead to a error

javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]

The solution is to add a different factory reference to your resource definition.

/META-INF/context.xml


/WEB-INF/web.xml

   Demo Datasource
   jdbc/resourceName
   javax.sql.DataSource
   Container

This should solve the issue with Tomcat selecting the inappropriate factory for connection pooling.

Leave a Reply

Your email address will not be published.