数据库开发中的一个连接问题

 在开发项目的过程中,出现了以下的问题:
org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [sqlstring]; SQL state [null]; error code [-4499]; A communication error has been detected. Communication protocol being used: T4Agent.sendRequest(). Communication API being used: OutputStream.flush(). Location where the error was detected: 断开的管道. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS ; nested exception is com.ibm.websphere.ce.cm.StaleConnectionException: A communication error has been detected. Communication protocol being used: T4Agent.sendRequest(). Communication API being used: OutputStream.flush(). Location where the error was detected: 断开的管道. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS
Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: A communication error has been detected. Communication protocol being used: T4Agent.sendRequest(). Communication API being used: OutputStream.flush(). Location where the error was detected: 断开的管道. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS
查询出错的地方,只是一个简单的查询sql,放到数据库中进行查询很正常.但是怎么会造成管道断开??
仔细想想后,发现可能是因为在使用的过程中,有人重新启动了数据库,而没有重新启动server.造成server中的数据库连接池中的连接都已经断开.
故,重新实现自己认为的错误过程,重新启动了db2,但是不重新启动server,确实造成了connection中断.出现以上问题.
我想原因大概如此吧.
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值