[Java] SpringMVC 阿里 ali druid 连接池 Communications link failure 解决方案
来源:互联网 发布:程序员应该去的网站 编辑:程序博客网 时间:2024/06/07 18:22
关键字:
SpringMVC spring dao 配置 阿里 druid 连接池 出现
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
症状:
2017-02-24 14:26:53 [ Druid-ConnectionPool-Create-675798468:1 ] - [ ERROR ] create connection error, url: jdbc:mysql://localhost:3306/fangdb?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true, errorCode 0, state 08S01 com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 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.at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:526)at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989)at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:632)at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1016)at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253)at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2284)at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2083)at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:806)at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
以下是错误信息截图
解决方案:
把jdk从1.7改成1.8
参考
https://pagespeed.v2ex.com/t/254112
- [Java] SpringMVC 阿里 ali druid 连接池 Communications link failure 解决方案
- Communications link failure一个解决方案
- 远程连接mysql的“Communications link failure”错误解决方案
- Hibernate连接池维护mysql异常:Communications link failure
- MySQL连接池“Communications link failure”的问题
- MySQL连接超时Communications link failure
- MySQL连接超时Communications link failure
- 连接数据库报错 Communications link failure
- sqoop连接mysql出现 Communications link failure
- Communications link failure
- Communications link failure
- mysql: Communications link failure
- Communications link failure
- Communications Link failure
- Communications link failure
- CommunicationsException: Communications link failure
- Communications link failure
- mysql Communications link failure
- Python爬虫之二:自制简易词典
- Windows下深度学习平台Keras环境搭建【CPU版】
- bootsect启动代码分析
- Gtest/Gmock探究(二)--TEST宏分析
- Linux命令-任务调度
- [Java] SpringMVC 阿里 ali druid 连接池 Communications link failure 解决方案
- Unregistering JMX-exposed beans on shutdown :spring boot的tomcat插件启动失败
- Storm ack容错机制案例
- 外排序
- java各种后缀邮件勒索病毒文件解密工具解密方法---达康勒索病毒解密中心15169121444
- C# 利用VS自带的WSDL工具生成WebService服务类
- hdu5729思维~~~
- 编译Android环境下Ffmpeg命令行
- AutoCAD .Net 使用 Database.ReadDwgFile 读取dwg文件而不显示文档窗口