1

i am trying to use the tomcat jdbc-pool in my application but it seems that i cannot find a repository that provides this dependency. Any clue in which repository i can find the latest release that can be used in a Maven build?

Marco
  • 15,101
  • 33
  • 107
  • 174

2 Answers2

5

Here is the correct dependency information for the Tomcat JDBC Pool.

<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-jdbc</artifactId>
    <version>7.0.19</version>
</dependency>
sparkyspider
  • 13,195
  • 10
  • 89
  • 133
4

If you are deploying to Tomcat the required JARs are bundled with the Tomcat servlet container, you don't have to (and shouldn't) include them in your WAR file.

Instead you should define the JDBC connection pool in Tomcat itself and then simply reference it in your application using JNDI.

Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
  • 1
    I checked and could be mistaken offcourse, but the jdbc-pool is not in the standard distro. The dbcp is there but not the jdbc-pool. I placed it in /lib dir and then it seems to work. – Marco Aug 31 '11 at 10:19
  • It's not good practice to dump dependencies in your WEB-INF classes or lib folder. Rather use the correct dependency (below) or manually add a "custom artifact" to your local maven repository. See: http://stackoverflow.com/questions/442230/how-to-manually-install-an-artifact-in-maven-2 – sparkyspider Oct 18 '11 at 19:46