赞
踩
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnec
是由于
<Resource name="jdbc/mydatasource" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@127.0.0.1:1521:oracle.domain" username="cms" password="cms" maxActive="20" maxIdle="10" maxWait="100000"/>
中的url还没改过来的缘故
<Context crossContext="true" docBase="G:\work\svn\cnooc.20141117\webapp" path="/cnooc">
<Resource driverClassName="oracle.jdbc.driver.OracleDriver" maxActive="300" maxIdle="800" maxWait="1000" name="framework" password="sunway" type="javax.sql.DataSource" url="jdbc:oracle:thin:@192.168.183.129:1521:ora11" username="mdmcnooc"/>
</Context>
catch SQLException when trying to get connection from DataSource
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
1、 把从oracle根目录下oracle/ora92/jdbc/lib/classes12.jar 包 拷到/SSHProject/WebRoot/WEB-INF/lib目录下。
或者:
2、tomcat中尚未加载class12.jar包,该包可以从oracle根目录下oracle/ora92/jdbc/lib/classes12.zip得到..然后解压后放置于tomcat根目录lib下
使用tomcat配置数据源,tomcat只去自己的lib中找驱动程序。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。