I\'ve seen several similar questions on stackoverflow, but they didn\'t solved my problem. This one is specially useful, since it points to official tomcat documentation an
The solutions provided there is, in short: tomcat needs jdbc database drivers to be copied to
$CATALINA_HOME/lib/
, because it will not find them underWEB-INF/lib/
. Ok, but it still does not work for me, and I am becoming mad.
This depends on how you load the driver.
If you configure the driver within you tomcat and provide it to the application then this statement is correct.
But you load the driver directly within your application. Then both ways, $CATALINA_HOME/lib/
(in tomcat) as well as WEB-INF/lib/
(in application) should work.
But Spring use a special way to load that class Class.forName(driverClassNameToUse, true, ClassUtils.getDefaultClassLoader())
and I dont know how it behave for files in $CATALINA_HOME/lib/
so I would try to put the files in your application WEB-INF/lib/
folder