本站首页    管理页面    写新日志    退出


«October 2025»
1234
567891011
12131415161718
19202122232425
262728293031


公告
暂无公告...

我的分类(专题)

日志更新

最新评论

留言板

链接


Blog信息
blog名称:
日志总数:83
评论数量:123
留言数量:0
访问次数:266270
建立时间:2006年8月17日




[中间件]Tomcat升级到5.5,数据源无法使用的问题整理
文章收藏,  软件技术

lylhelin 发表于 2008/3/13 16:04:34

近日已经有多人询问此问题,这里简单的说明一下,希望遇到此问题的朋友有帮助 5.0中的配置如下 500)this.width=500'><Resource name="jdbc/student" auth="Container" type="javax.sql.DataSource" /> 500)this.width=500'><ResourceParams name="jdbc/student"> 500)this.width=500'>  <parameter> 500)this.width=500'>    <name>factory</name> 500)this.width=500'>    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> 500)this.width=500'>  </parameter> 500)this.width=500'>  <parameter> 500)this.width=500'>    <name>username</name> 500)this.width=500'>    <value>root</value> 500)this.width=500'>  </parameter> 500)this.width=500'>  <parameter> 500)this.width=500'>    <name>password</name> 500)this.width=500'>    <value>sa</value> 500)this.width=500'>  </parameter> 500)this.width=500'>  <parameter> 500)this.width=500'>    <name>driverClassName</name> 500)this.width=500'>    <value>com.mysql.jdbc.Driver</value> 500)this.width=500'>  </parameter> 500)this.width=500'>  <parameter> 500)this.width=500'>    <name>url</name> 500)this.width=500'>    <value>jdbc:mysql:// localhost:3306/student?useUnicode=true&amp;characterEncoding=UTF-8</value> 500)this.width=500'>  </parameter> 500)this.width=500'>  <parameter> 500)this.width=500'>    <name>maxActive</name> 500)this.width=500'>    <value>20</value> 500)this.width=500'>  </parameter> 500)this.width=500'>  <parameter> 500)this.width=500'>    <name>maxIdle</name> 500)this.width=500'>    <value>5</value> 500)this.width=500'>  </parameter> 500)this.width=500'>  <parameter> 500)this.width=500'>    <name>maxWait</name> 500)this.width=500'>    <value>10000</value> 500)this.width=500'>  </parameter> 500)this.width=500'></ResourceParams> 在5.5下面,报的异常如下 500)this.width=500'>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' 解决方法: 其实在5.5的文档里面,已经给出了配置的标准写法。将数据源修改为如下格式即可 500)this.width=500'><Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" 500)this.width=500'>   maxActive="100" maxIdle="30" maxWait="10000" 500)this.width=500'>   username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver" 500)this.width=500'>   url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/> 本文来自:www.ailiss.cn              


阅读全文(2280) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.031 second(s), page refreshed 144797651 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号