Tomcat6 ignores web-inf/lib

痴心易碎 提交于 2019-12-04 15:54:05

The stacktrace tells that you've created a DataSource as <Resource> in Tomcat's side. In that case, the JDBC driver JAR file really needs to be put in Tomcat's side as well as it's Tomcat who manages the DataSource, not your webapp. Drop it in Tomcat/lib and this exception should disappear. You could also drop it in an external folder and add its path to Tomcat's common classpath as definied by common.loader property in /conf/catalina.properties file.

Please note that you don't need to load the driver manually. Just grab the DataSource and then get the Connection from it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!