程序报错CommunicationsException:Communications link failure
来源:互联网 发布:云计算三年行动计划 编辑:程序博客网 时间:2024/05/22 13:51
今天写到mysql连接池,程序运行之后江山一片红,这坑爹的异常还真是难办 没有办法,只能通过Debug慢慢调试。
最后找到问题原因所在:
网上很多人是conn里面是空值,但我的问题是conn不为空,而stmt里的值为空,(应该跟上面报的异常有关系,有的人是 was xxx milliseconds ago,而我的是直接为0秒),所以按照网上那些办法当然也解决不了问题啦,不过网络还真是个神奇的地方,耐心下去找总会摸索出方向来的,最后真被我找到解决办法了,不多说直接上图:
上面红色箭头标记的就是mysql的服务项,这个里面是自动的,对应的我打开数据库也发现是no connection,到此终于明白了,原来是数据库没有连接啊解决办法很简单了,右键点击上面服务项里的mysql由自动变为开启就好了,再运行程序一切都OK
0 0
- 程序报错CommunicationsException:Communications link failure
- CommunicationsException: Communications link failure
- spark<CommunicationsException: Communications link failure>
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure连接报错解决方法之一
- jdbc报错 :com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- com.mysql.jdbc.CommunicationsException: Communications link failure
- Communications link failure报错的处理
- 连接数据库报错 Communications link failure
- solr DataImportHandler 报错 Communications link failure
- Mysql报错:communications link failure
- Mysql报com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure错误
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- 解决com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- jdbc4.CommunicationsException: Communications link failure 与Mysql空闲等待时间 问题
- 解决com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- Web系统大规模并发——电商秒杀与抢购
- tomcat总结
- Java基础知识详细总结
- JAVA技术路线图
- ORACLE 11G 搭建dataguard详细步骤(所有操作总结)
- 程序报错CommunicationsException:Communications link failure
- 如何减小与“大牛”的差距
- Tomcat-Jdbc-Pool配置及性能调优
- Hue上的Oozie如何构建工作流和定时任务
- java取系统时间并格式化
- (一)Http请求、Http响应、 Socket
- 执行【本地命令】获取本机MAC
- linux 下安装oracle11g内核参数介绍
- Myeclipse8.5 折叠代码插件 code folding 使用方法