2 zhaohaibo 1988 zhaohaibo_1988 于 2016.03.22 16:57 提问

Could not open JDBC Connection for transaction

org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
Caused by:
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

在linux系统下部署项目,启动的时候就报这个错,在网上看了很多资料,有说hosts问题,有说配置文件问题,还有说连接池有问题,看了这么多也不知道改什么,希望大神能够指点指点。

2个回答

caozhy
caozhy   Ds   Rxr 2016.03.22 17:36

检查连接字符串,你的数据库的配置,比如是否开启防火墙端口例外,用户账户和权限,网络是否连通等。

zhaohaibo_1988
zhaohaibo_1988 之前有一个项目已经部署了,用的oracle,现在部署的项目时mysql,然后这个新的项目就无法正常部署,不知道是否是连接的问题
2 年多之前 回复
u012377333
u012377333   Rxr 2016.03.29 19:41

你使用的jdbc还是jndi的方式,如果是jdbc的话,需要修改连接的url的

zhaohaibo_1988
zhaohaibo_1988 这个问题已经解决了,不知道是否有人改了什么连接或者用户信息,然后已经部署成功了,谢谢了
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for
问题?org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction 整合大三大框架的时候,单独测试没问题,在请求action的时候,会出现以下问题: org.springframework.transaction.Canno
使用线程池插入数据报Could not open JDBC Connection for transaction 异常
前言 原因分析 解决方案 错误信息 前言 使用线程池插入数据报Could not open JDBC Connection for transaction 异常 Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.DataSourceClose...
spring quartz Could not open JDBC Connection for transaction; 错误
使用Quertz访问数据库出现的错误:spring quartz  Could not open JDBC Connection for transaction 解决方案:dynamicDataSource 动态数据源 删除,dynamicDataSource 修改成 dataSource 重新部署Tomcat
Could not open JDBC Connection for transaction; nested exc [用户名密码错误异常】
HTTP Status 500 - Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is o
Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.GetConnec
Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 3000, active 16, maxActive 16"这个异常可能是因为druid连接池泄漏产生的异常。连接超时,active...
Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNest
翻译:无法打开的JDBC连接的事务;嵌套异常java.sql.SQLException:无效的状态,连接对象关闭....
HTTP Status 500 - Could not open JDBC Connection for transaction
完整错误代码如下: HTTP Status 500 - Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: solid.jdbc.SolidDriver type Exception report message Could not open JDBC Con
Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connectio
严重: StandardWrapper.Throwableorg.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections co
Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: socket creation error
<br />Q:org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: socket creation error at org.springframework.jdbc.datasource.DataSourceTransactionManager
Could not open JDBC Connection for transaction~~~Io 异常: The Network Adapter could not establish the
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create Poolable...