转载请标明出处:
本文出自:【ouyida3的博客】
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
解决:tomcat里原来oracle的factory忘了去掉了
<Resource name="jdbc/sdact1ds"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@13.121.2.13:1521:bsstest"
username="ucr_ap"
password="ucr_ap"
maxActive="60"
maxIdle="20"
maxWait="10000"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"/>
Caused by: java.sql.SQLException: No suitable driver
解决:和上面类似,还是tomcat里的Resource节点没有配置对
<Resource name="ds_zplat_cen1"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://13.51.23.24:3010/zplatdb"
username="zplat_cen1"
password="12345"
maxActive="60"
maxIdle="20"
maxWait="10000"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
defaultAutoCommit="false"/>
Caused by: java.lang.AbstractMethodError: com.mysql.jdbc.Connection.isValid(I)Z
解决:mysql的jar版本过低引起,改为mysql-connector-java-5.1.34.jar即可(注意官网最新的是5.1.35,懒得下载最新了,这个5.1.34在tomcat8里跑没问题)
官网下载地址:http://dev.mysql.com/downloads/connector/j/
2015.6.30
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/ouyida3/article/details/46699023