Cannot create PoolableConnectionFactory (Communications link failure due to underlying exception 解决

来源:互联网 发布:flash播放器mac版 编辑:程序博客网 时间:2024/04/28 08:06

          出现Cannot create PoolableConnectionFactory (Communications link failure due to underlying exception 这个问题,查询问题发现可能是tomcat-dbcp连接池,看到别人的解决方式是:

解决:删除Tomcat下的项目。

        主要是以下两个目录:

        \Tomcat 6.0\webapps         \Tomcat 6.0\work\Catalina\localhost

 

Tomcat里部署的项目越少越好。比如我一般要使用哪个项目就部署哪个,其他的都删除。这样一是提高Tomcat的启动速度,二是避免出现不必要的错误。

  或者是给context.xml加入

<Resource auth="Container" 
driverClassName="com.mysql.jdbc.Driver" 
 maxActive="100" 
 maxIdle="30" 
 maxWait="10000" 
 name="jdbc/mysql" 
 password="root" 
 type="javax.sql.DataSource" 
 url="jdbc:mysql://localhost:3306/dome7?characterEncoding=UTF-8" 
 username="root"/>

就好,试试吧。

0 0
原创粉丝点击