开发者社区 问答 正文

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问题,有说配置文件问题,还有说连接池有问题,看了这么多也不知道改什么,希望大神能够指点指点。

展开
收起
杨冬芳 2016-07-18 14:59:01 7995 分享
分享
版权
举报
0 条回答
写回答
取消 提交回答
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等