maven项目出现中数据库Communications link failure [问题点数:40分]

Bbs1
本版专家分:60
结帖率 0%
Bbs4
本版专家分:1363
Bbs1
本版专家分:60
Bbs1
本版专家分:0
Bbs1
本版专家分:0
其他相关推荐
MyBatis数据库连接出现Communications link failure现象的解决办法(dbcp2连接池)
背景近期项目生产环境中老是出现”Communications link failure,The last packet successfully received from the server was ** millisecond ago.” 然后系统就无法读取数据库了。解决办法1、排查mysql数据库配置文件my.cnf中有无wait_timeout、interactive_timeout两个
MySql的Communications link failure解决办法
MySql的Communications link failure解决办法
Communications link failure故障问题
在这普通的一天,我和平常一样普通打开了我的小电脑,普通的打开了Eclipse,普通的跑起了项目。 震惊!!!!!!   一男子。。。。 咳~ 不要想太多  只是报了个错而已 上图! 拒绝连接了,差看了半天url发现都是正确的,去百度查找答案,尝试了大神们的方案。。 凉凉 打开Navicat连接一波  凉凉 就在这时 我发现我的WIFI好像连错了  尝试连接公司的网之后重试 ...
tomcat中报错Communications link failure数据库链接和mybatis连接池问题
服务器环境:tomcat7 jdk7 mysql5.6 win-server2008 自己的解决方案: 未完待续... 转载网络文章: 文章来源链接:关于 Communications link failure 的解决 问题描述:tomcat启动项目后 是不是的会出现Communications link failure这个错误。错误头如下: 23:02:28,
Communications link failure
连接超时出现com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 解决方法: (1)cmd输入mysql需要密码NO C:\Program Files\MySQL\MySQL Server 5.5\my.ini里[mysqld]下添加skip-grant-tab
Communications Link failure
这个错误是因为数据库设置的wait_timeout和interactive_timeout两个参数时间比较短引起的,解决方案一个是延长这两个参数,另一个方法就是修改数据库连接池testOnBorrow参数,改为true即可解决问题。 Mark一下
Mysql Communications link failure 问题的解决
源地址:http://stackoverflow.com/questions/6865538/solving-a-communications-link-failure-with-jdbc-and-mysql 问题现象 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failu
Communications link failure的解决办法
使用Connector/J连接MySQL数据库,程序运行较长时间后就会报以下错误: Communications link failure,The last packet successfully received from the server was *** millisecond ago.The last packet successfully sent to the server was
解决mysql:Communications link failure
在本地(win10)eclipse中用mybatis连接虚机(ubuntu server 14.04,ip为192.168.50.110)中mysql 5.6。 mybaits-config.xml配置如下: 运行项目,出现问题: 原因:虚机中的mysql只允许本地访问,注释掉/etc/mysql/my.cnf中bind-address选项,如图 重启mysql,或
Communications link failure报错的处理
一.报错的问题: 测试环境在做压力测试的时候爆出错误 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure INFO | jvm 1 | 2013/10/24 14:22:28 | INFO | jvm 1 | 2013/10/24 14:22:28
mysql:Communications link failure解决
mysql: Communications link failure解决  使用Connector/J连接MySQL,程序运行较长时间后就会报以下错误:  Communications link failure,The last packet successfully received from the server was *** millisecond ago.The last packet ...
mysql - Communications link failure的解决办法
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure Last packet sent to the server was X ms ago使用Connector/J连接MySQL数据库,程序运行较长时间后就会报这个错误,有时错误还会提示你修改wait_timeout或是使用Conne...
MySQL异常【数据库断开连接】:Communications link failure
一,异常信息以及解决办法 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connectio...
链接数据库报错(Communications link failure)之解决篇,
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 packet
[已解决]踩过的坑之mysql连接报“Communications link failure”错误
先给大家简述一下我的坑吧,(我用的是mysql,至于oracle有没有这样的问题,有心的小伙伴们可以测试一下哈),在自己做个javaweb测试项目的时候,因为买的是云服务器,所以数据库连接的是用ip地址,用IDE开发好后,于是部署到远程云服务器上,这时候我是直接部署上去的,如图所示,数据库配置就是这样的(图中连接地址是假的,我改过了,这里仅仅演示)过了一段时间后,我通过controller路径去访...
链接数据库报错(Communications link failure
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from...
c3p0连接数据库时报错,连接不上Communications link failure
具体错误如下: [2017-08-10 15:14:40|WARN |com.mchange.v2.resourcepool.BasicResourcePool] - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6cde6d8b -- Acquisition Attempt Failed!!! Clearing pending
MyBatis Generator报错:Cannot instantiate object of type
1.错误信息 [ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project myssm: Execution default-cli of goal org.mybatis.generator:mybatis...
org.apache.maven.plugin.MojoExecutionException: protoc failure
build   hadoop 23 真的是千辛万苦,错误贴出来 [ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-c [Help 1] org.apache.maven.lifec
使用maven写项目时报java - org.apache.maven.plugin.MojoExecutionException:
写分布式项目的时候,用maven,   运行地时候报这个错误 [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException; 然后我就在运行里找到 这个,如图 然后再点击下面的 ,选择utf-8,然后运行,  然后重新运行,就可以  成功了,
阿里云部署项目时遇到的Communications link failure
症状表现: [localhost-startStop-1] ERROR com.alibaba.druid.pool.DruidDataSource - dataSource init error com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packe
通过在SpringBoot中配置连接池属性解决MySql连接池Communications link failure问题
文章目录1.错误日志2.错误分析3.纠错方法3.1.说明3.2.添加依赖3.2.配置连接池属性 1.错误日志 2018-10-11 04:00:15,642 ERROR traceId:0 com.alibaba.druid.pool.DruidDataSource:1600 - discard connection -- Exception: com.mysql.jdbc.exception...
MySQL innodb引擎,事务提交 commit 异常,但数据提交成功
昨天线上服务出现的奇怪的异常,数据库中数据已经提交(都是innodb引擎), 但是java代码抛出异常,并从日志分析是commit异常,最后在catch中的rollback都为时已晚。 这次的异常可与之前的与众不同,之前的如果commit异常了,数据肯定是回滚了(mysql服务器没有收到commit,并且连接已经中断),commit异常了,但是服务器数据没有回滚。
使用maven打包项目遇到错误: http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
今天在使用maven打包项目时遇到一个错误: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.4:compile (default-compile) on project zjydpt: Fatal error compiling: tools.jar not found: D:\Jav
Communications link failure The last packet successfully received from the server was 29,623,329 m
这个问题一般出现在,长时间未使用mysql连接导致mysql那边已经断开,但连接池还以为是正常连接中,所以去访问则会报错。 解决很简单,如果用c3p0  那么直接加: <!-- 设置每隔多少秒 检查空闲连接 --> <property name="idleConnectionTestPeriod" value="60"/>  ...
MySQL连接池“Communications link failure”的问题
错误描述使用MySQL,业务程序需要每天运行一次,然后将结果保存到MySQL。发现每次第一次运行没有问题,到了第二次运行的时候就会报错:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received from the se
maven deploy时报错
今天在发布maven工程的时候,很奇怪,因为在本地package,install等等都没问题,但是打包的时候就是报错,日志如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project courier-rapi: Deplo
部署web项目时遇到的一个问题Communications link failure
https://blog.csdn.net/ssuhvs/article/details/50134249
hadoop 集群 远程访问 mysql(通过sqoop从远程数据库服务器向hdfs迁移数据) 屡次失败的原因
首先,我介绍一下我搭建的环境(win8系统上的1个VM的工作站,跑了6个centos虚拟机),6个节点,3个datanode,1个 sourcemanager 2个namenode。 设置了虚拟网络ip (非localhost),以下问题在老鸟看来是在平常不过了,但我还是只小鸟,这个问题的解决是我又上了一个台阶啊。同时,我也希望借此博文帮助到大家,让大家少走弯路。聪明的你也可以在我后面揭晓解决方
安装完hive,启动错误解决办法
安装完hive时,运行没问题,后来再次开启时出现如下问题: hive> show databases; FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Communications link failure The last packet sent successfully to the server
Hive:安装Hive遇到的一些问题 (Remote Server Mode模式)
Hive安装遇到的一些坑,com.mysql.cj.core.exceptions.CJCommunicationsException: Communications link failure Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bhive.session NestedThrowablesStackTrace: Could not create "increment"/"table" value-generatio
远程连接mysql的“Communications link failure”错误解决方案
最近忙着做毕设的东西,用到了mysql存储一些系统元数据,在使用系统ip地址连接的时候出现错误,但是使用localhost连接mysql却没有问题。 错误信息:Communications link failure,Last packet sent to the server was 0 ms ago. 最初想到的是授权问题,即授权制定的数据库有远程访问权限。有两种方法: 1)采用改
控制台报“Communications link failure”错误
一、现象描述报错信息如下: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 a...
maven插件mybatis-generator自动生成
1、新建一个maven项目 添加插件                 org.mybatis.generator                 mybatis-generator-maven-plugin                 1.3.2                                     false
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project ssm: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plu
mysql 异常com.mysql.jdbc.CommunicationsException
com.mysql.jdbc.CommunicationsException Communications link failure due to underlying exception:
eclipse中使用mybatis-generator逆向代码生成工具问题解决记录
问题一:  eclipse中使用mybatis-generator逆向代码生成工具出现waiting for "building  workspace" 解决办法: 选择菜单栏的  Project  ,然后把菜单栏中 Build Automatically 前面的对钩去掉即可解决。   问题二: com.mysql.jdbc.exceptions.jdb
JMeter连接数据库常见问题
1、防火墙未关 错误: 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. 问题: 防火墙未关 解决办法: [roo
kettle连接mysql异常处理
kettle连接mysql数据库时,抛出异常:Communications link failure The last packet sent successfully to the server, The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
关于kettle 与mysql 连接后 出现错误的问题
近日在用kettle 连接MySQL的时候 总是在链接成功之后  出现各种出现问题,不是看不到数据库中的表 就是提示sql语句报错 (这个错误是在我没有写任何sql 语句的情况下爆出的错误)或者直接就连不上数据库   总之各种问题 然后就是在各种网站找答案加群去问问题  最终无果   遂自己周末在家里琢磨  终于在今天干掉了这个问题   很简单  就是jar包的问题 我用的kettle
连接池连接数据库报Communications link failure错误
本地无错误,发布到服务器上报如下错误: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnection
MyBatis Generator在pom.xml中配置的configuration无效(configurationFile、overwrite等)
MyBatis Generator:MyBatis代码自动生成插件,下文简称MBG。 关于MBG的用法,可以参考: MyBatis代码实例系列-08:通过Maven运行 MyBatis Generator,以及MyBatis Generator的扩展用法—生成中文注释和Mapper重命名为Dao 1.错误信息 在pom.xml中,在配置MBG插件时,可以通过configuration标...
MyBatis连接数据库失败可能的原因
0 [main] DEBUG org.apache.ibatis.logging.LogFactory  - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.136 [main] DEBUG org.apache.ibatis.logging.LogFactory  - Logg...
spring 事物多线程问题
Dec 12, 2015 4:46:04 PM com.alibaba.druid.pool.DruidDataSource error SEVERE: discard connection com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure duri
数据库链接超时(默认8小时)报错:MySQLNonTransientConnectionException
myBatis连接MySQL报异常:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. 连接池报错  myBatis连接MySQL报异常:No operations allowed after co
mysql数据库连接错误的奇葩原因
今天使用 PHP 连接一个 MySQL 数据库的时候连不上仔细核对用户名和密码都没问题,并且数据库的链接语句也都没问题,实在找不到为什么链接不进去,找了半天才找到原因: 原来是mysql用户名设置的太长了,捣鼓了30分钟居然是这么个原因无语.....
Jmeter 链接数据库
1. jmeter 链接数据库 一、将ojdbc14.jar放至Jmeter路径下(..\apache-jmeter-2.7\lib);否则会报错  Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver' 二、启动Jmeter后添加线程组,线程组下添加-配置元件-JDBC Connection Configuration ...
sql查询语句的执行顺序
sql查询语句的处理步骤如下:--查询组合字段 (5)select (5-2) distinct(5-3) top()(5-1) --连表 (1)from (1-J) join on (1-A)
初学mybatis generator
在一个项目中使用mybatis generator,报错Communications link failure 看了网上许多大牛的说法,最后发现是自己的mysql服务没有打开
深入浅出MyBatis技术原理与实战
MyBatis
mybatis 插件 generator 学习
其实比较简单,主要包括两个配置文件 在pom.xml里加入一下代码 org.mybatis mybatis 3.2.8 org.mybatis mybatis-spring 1.2.2
解决多线程并发问题
1、文件锁 如果对该表的更新或插入的操作,都会经过一个统一的文件,这种方式是可以解决的多进程并发的问题; 实现方式如下: public static function cbInventoryReserve() { $LOCK_FILE_PATH = $_SERVER['DOCUMENT_ROOT']."wmsinventoryapi/inventory/Invent
多线程连接MySQL数据库,报 Communications link failure
大概是这样的思路,扫描2000+的MySQL服务器,通过我的弱口令表去挨个连接他们(大概100个账户),看看能否成功,如果成功则证明检查不合格。共5个thread,一个thread中包含一个大循环遍历
MYsql Communications link failure
[code=Java] int n = 5000;rn for (int i = 0; i < n; i++) rn String url = "jdbc:mysql://localhost/blog";rn String name = "root";rn String pass = "88888";rn Class.forName("com.mysql.jdbc.Driver");rn Connection conn = DriverManager.getConnection(url, name, pass);rn conn.close();rn [/code]rnrnException in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrn这是什么异常rnN=1000 的时候没问题
SQLSTATE=08S01通讯连接失败
导致此错误的原因是连接池已经耗尽,所以在连接数据库时要记得关闭连接,防止连接用完。
myeclipse DB Browser 连接mysql 报错的解决方案
前几天使用正常,前天忽然一直报出这个错误,三天后终于解决。因为正常使用过,所以配置、url等硬性问题是不可能的。除此配置问题之后网上的方法有:1.修改mysql里面的my.ini文件修改时间,不赘述,很多人说过。2.关闭防火墙。以上方法我都试过,没用。我的方法是:首先修改DB Browser里面你需要的那个连接的属性(即edit),把之前的localhost改成127.0.0.1;然后依次修改hi...
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
各位哥哥姐姐rn出现com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure这个怎么办啊?谢谢啊
com.mysql.jdbc.CommunicationsException: Communications link failure
连接数据库的时候报:com.mysql.jdbc.CommunicationsException: Communications link failurern怎么解决?
.jdbc4.CommunicationsException: Communications link failure
[code=java]rncom.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnThe last packet successfully received from the server was 1,083,707 milliseconds ago. The last packet sent successfully to the server was 4 milliseconds ago.rn at sun.reflect.GeneratedConstructorAccessor66.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3090)rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3520)rn at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)rnrn,,,,,,,,,,,,,,,,,,,,,,,rnrnCaused by: java.net.SocketException: Software caused connection abort: recv failedrn at java.net.SocketInputStream.socketRead0(Native Method)rn at java.net.SocketInputStream.read(Unknown Source)rn at java.net.SocketInputStream.read(Unknown Source)rn at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:114)rn at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:161)rn at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:189)rn at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2537)rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2990)rn ... 115 morernrn[/code]rnrn总是出现这个错误,每过几分钟就出现一次,在页面操作第一次出现这个错误,点击操作第二次就可以。rnrn网上说的:rnmysql﹥ show global variables like 'wait_timeout';rnrn+---------------+---------+rnrn| Variable_name | Value |rnrn+---------------+---------+rnrn| wait_timeout | 28800 | //---->默认空闲连接时间8个小时,超时将关闭该连接rnrn+---------------+---------+rn但是好像并不是这个问题,也不存在8个小时不操作,8分钟都没有。rnrn
Communications link failure不去修改MySQL配置的解决办法
    之前在网上看了很多关于Communications link failure的文章,无外乎就是去修改MySQL里面的两个time-out,最可气的是有文章是要去my.ini配置文件里面进行修改,然而这个文件是在programdata里面,但是,重点来了,c盘里面没有programdata,我就一直找啊找啊,真的是每个地方的掘地三尺了,后来才发现,这是个隐藏文件,唉,于是又慢慢把这个隐藏文件...
jdbc在连接mysql数据库的时候出现一下问题的时候的解决另一种方法
问题语句: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.(翻译:                              通信链...
链接MySql 出现 Communications link failure
执行jar包,出现rnCommunications link failurernrnLast packet sent to the server was 0 ms ago.rn错误rnrn网上查了下,据说是链接打开一段时间没有处理超时,于是在my.cnf配置里面加上了timeout时间rnrn但是我只是在执行jar包的之后链接DB。rn并且链接DB取出数据后就close链接了。rnrn搞不懂为什么会出现这个问题。
【问题】jira不能启动
HTTP Status 500 - com.opensymphony.module.propertyset.PropertyImplementationException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully
关于 Communications link failure 的解决
rn这个项目是基于SSH 框架,数据库是MYSQL ,服务器是TOMCAT,部署完成后,经过一段时间(估计约8小时,但不确定),当再次访问该项目,即:当与数据库再次连接时,就报下面这个异常,请各位帮忙分析解决,高分酬谢!rnrn[code=Java]rn23:02:28,445 ERROR JDBCTransaction:67 - JDBC begin failedrncom.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnLast packet sent to the server was 31 ms ago.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009)rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438)rn at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)rn at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)rn at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)rn at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4916)rn at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)rn at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)rn at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)rn at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)rn at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:510)rn at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350)rn at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:262)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)rn at $Proxy26.findUserByUserNameAndPassword(Unknown Source)rn at com.lenovo.mfgot.action.login.LoginAction.execute(LoginAction.java:56)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)rn[/code]rnrnapplicationContext_common.xml 部分如下:rn[code=XML]rn..........省略部分........rnrn rn rn rn rn rn rn rn rn rn rn rn rn..........省略部分........rn[/code]
SQL exception:Communications link failure
用eclipse打开一个项目的主程序运行无误,但是在GUI上点击连接数据库的时候提示:rnSQL exception:Communications link failurernrnLast packet sent to the server was 0 ms ago. ad L119rn============= poll poll pollrncontructing FrameCollecterrn数据库关闭出错!rnwrong addressrn求大神指导,没有描述清楚的地方我会再补充!
k8s 权威教程第一章demo(Bug)
Bug 1 问题描述 做Tomcat的例子,结果get pods一直显示没有资源? 应用配置代码: apiVersion : v1 kind : ReplicationController metadata : name : mysql spec : replicas : 2 selector : app : mysql template : ...
Communications link failure due to underlying
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: rn rn ** BEGIN NESTED EXCEPTION ** rn rn java.io.EOFException rn rn STACKTRACE: rn rn java.io.EOFException rn at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913) rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2304) rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803) rn at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) rn at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) rn at com.mysql.jdbc.Connection.execSQL(Connection.java:3118) rn at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5215) rn at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkTransaction(BaseWrapperManagedConnection.java:425) rn at org.jboss.resource.adapter.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:766) rn at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:214) rn at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:497) rn rn ……
【追光者系列】HikariCP 源码分析之故障检测那些思考 fail fast & allowPoolSuspension...
点击上方“芋道源码”,选择“置顶公众号”技术文章第一时间送达!源码精品专栏 精尽 Dubbo 原理与源码专栏( 已经完成 69+ 篇,预计总共 75+ 篇 )中文详细注释...
KETTLE常见问题和优化
kettle的问题和优化 kettle连接池 Communications link failure during commit()
链接数据库 出现Cannot create PoolableConnectionFactory (Communications link failure
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failurernrnThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)rn at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.java:1098) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:350) ~[commons-dbcp-1.4.jar:1.4]rn at com.unionticket2.util.LogUtil.init(LogUtil.java:106) [bin/:?]rn at com.unionticket2.util.LogUtil.init(LogUtil.java:66) [bin/:?]rn at com.unionticket2.calc.CalcServer.main(CalcServer.java:20) [bin/:?]rnCaused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_111]rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_111]rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_111]rn at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_111]rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1121) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:357) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2482) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2519) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_111]rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_111]rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_111]rn at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_111]rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[commons-dbcp-1.4.jar:1.4]rn ... 6 morernCaused by: java.net.ConnectException: Connection timed out: connectrn at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[?:1.8.0_111]rn at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) ~[?:1.8.0_111]rn at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_111]rn at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_111]rn at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_111]rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:1.8.0_111]rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_111]rn at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_111]rn at java.net.Socket.connect(Socket.java:538) ~[?:1.8.0_111]rn at java.net.Socket.(Socket.java:434) ~[?:1.8.0_111]rn at java.net.Socket.(Socket.java:244) ~[?:1.8.0_111]rn at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:259) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:307) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2482) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2519) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_111]rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_111]rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_111]rn at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_111]rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346) ~[mysql-connector-java-5.1.26-bin.jar:?]rn at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[commons-dbcp-1.4.jar:1.4]rn at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[commons-dbcp-1.4.jar:1.4]rn ... 6 more
Tigase XMPP Server 安装与常见问题
安装   参考官网资料即可,推荐使用GUI界面的方式,只要配置一些参数即可轻松完成。   官方网站  http://www.tigase.org/   安装指南  http://www.tigase.org/content/quick-start   插件开发  http://www.tigase.org/content/writing-plugin-code     组件开发
关于mysql无法打开或者异常或者通讯连接失败的问题
Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has ...
springboot启动,报jdbc连接池的错误
2017-03-07 11:40:16.127 ERROR 31460 --- [pool-1-thread-1] o.a.tomcat.jdbc.pool.ConnectionPool      : Unable to create initial connections of pool. com.mysql.jdbc.exceptions.jdbc4.CommunicationsEx
在Keil里面仿真stm32程序出现Communication failure错误
问题现象 在使用CMSIS-DAP仿真器的时候,经常出现连不上仿真器,很烦人,就算你重启MDK或者重启电脑,插拔主板的电源或者仿真器的usb连接线都无济于事。错误提示: 问题分析: 把可能出现硬件问题都一遍遍排除了,剩下就是软件问题了,莫非是MDK的配置问题,打开仿真器的设置,上面的设置似乎也没啥问题,只提示仿真器通讯错误。心里想:莫非是工程配置文件的问题?于是打开其他工程,下载
K8s的POD连接数据库时报错
&#13; [root@cccc xxxx]# ./showlog.sh dr iff-dr-1128668949-lb90g 2017-09-29 03:21:57,575 INFO [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction: Logging - STABLE ...
Communications link failure due to underlying exception:
我在使用hibernate连接时,出错,我没使用连接池,使用的是jdbc连接方式,错误如下rn2008-10-19 05:09:49,766 ERROR [jp.yicha.adsys.hibernate.DBOperator] - rnorg.hibernate.exception.JDBCConnectionException: could not execute queryrn at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)rn at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)rn at org.hibernate.loader.Loader.doList(Loader.java:2148)rn at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)rn at org.hibernate.loader.Loader.list(Loader.java:2024)rn at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)rn at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)rn at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)rn at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)rn at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)rn at jp.yicha.adsys.hibernate.DBOperator.selectWithHql(DBOperator.java:211)rn at jp.yicha.adsys.hibernate.handler.UserHandler.getUser(UserHandler.java:63)rn at jp.yicha.adsys.hibernate.handler.UserHandler.checkUserValid(UserHandler.java:35)rn at jp.yicha.adsys.struts.LoginAction.execute(LoginAction.java:86)rn at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)rn at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)rn at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)rn at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)rn at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)rn at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)rn at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)rn at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)rn at jp.yicha.struts.action.SetEncoding.doFilter(SetEncoding.java:73)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)rn at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)rn at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)rn at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)rn at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)rn at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)rn at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)rn at java.lang.Thread.run(Thread.java:595)rnCaused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: rn
求助!mysqL连接报Communications link failure
用jdbc连接:jdbc.driver.class=com.mysql.jdbc.Driverrnjdbc.connection.url=jdbc:mysql://localhost:3306/smbms?useUnicode=true&characterEncoding=utf-8rnjdbc.connection.user=rootrnjdbc.connection.password=bdqnrn如上配置文件,然后通过java一些方法查出该数据库一些表的信息没有任何问题。rn但是如果配置文件改成如下的:rnjdbc.driver.class=com.mysql.jdbc.Driverrnjdbc.connection.url=jdbc:mysql://localhost:3306/smbms?useUnicode=true&characterEncoding=utf-8rnjdbc.connection.user=rootrnjdbc.connection.password=bdqnrn然后调用java程序就会报如下错误:rncom.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnLast packet sent to the server was 0 ms ago.rnat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rnat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rnat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rnat java.lang.reflect.Constructor.newInstance(Constructor.java:513)rnat com.mysql.jdbc.Util.handleNewInstance(Util.java:353)rnat com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)rnat com.mysql.jdbc.Connection.createNewIO(Connection.java:2001)rnat com.mysql.jdbc.Connection.(Connection.java:716)rnat com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)rnat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rnat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rnat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rnat java.lang.reflect.Constructor.newInstance(Constructor.java:513)rnat com.mysql.jdbc.Util.handleNewInstance(Util.java:353)rnat com.mysql.jdbc.Connection.getInstance(Connection.java:295)rnat com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)rnat java.sql.DriverManager.getConnection(DriverManager.java:582)rnat java.sql.DriverManager.getConnection(DriverManager.java:185)rnat BaseDao.getConnection(BaseDao.java:24)rnat SelectTab.selectTab(SelectTab.java:20)rnat CreateXml2View.main(CreateXml2View.java:12)rnCaused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnLast packet sent to the server was 0 ms ago.rnat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rnat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rnat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rnat java.lang.reflect.Constructor.newInstance(Constructor.java:513)rnat com.mysql.jdbc.Util.handleNewInstance(Util.java:353)rnat com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)rnat com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:615)rnat com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1014)rnat com.mysql.jdbc.Connection.createNewIO(Connection.java:1930)rn... 14 morernCaused by: java.net.SocketException: Connection resetrnat java.net.SocketInputStream.read(SocketInputStream.java:168)rnat com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)rnat com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)rnat com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)rnat com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1955)rnat com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:547)rn... 16 morern上网搜了半天,仍然解决不了,求大神帮忙,在线等 谢谢了
高手解决下,Communications link failure due to underlying
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: rn rn ** BEGIN NESTED EXCEPTION ** rn rn java.io.EOFException rn rn STACKTRACE: rn rn java.io.EOFException rn at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913) rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2304) rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803) rn at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) rn at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) rn at com.mysql.jdbc.Connection.execSQL(Connection.java:3118) rn at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5215) rn at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkTransaction(BaseWrapperManagedConnection.java:425) rn at org.jboss.resource.adapter.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:766) rn at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:214) rn at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:497) rn rn ……
MyEclipse连接mysql出错:Communications link failure
[size=11px][color=#FF0000]JAVA类代码:[/color][/size]import java.sql.*;rnrnpublic class TestJDBC rnrn public static void main(String[] args) rn ResultSet rs = null;rn Statement stmt = null;rn Connection conn = null;rn try rn Class.forName("com.mysql.jdbc.Driver");rn rn conn = DriverManager.getConnection("jdbc:mysql://localhost:8080/heng","root","root");rn stmt = conn.createStatement();rn rs = stmt.executeQuery("select * from ur");rn while(rs.next()) rn System.out.println(rs.getInt("userno"));rn System.out.println(rs.getString("username"));rn System.out.println(rs.getString("userpassword"));rn System.out.println(rs.getString("useraddress"));rn rn catch (ClassNotFoundException e) rn e.printStackTrace();rn catch (SQLException e) rn e.printStackTrace();rn finally rn try rn if(rs != null) rn rs.close();rn rs = null;rn rn if(stmt != null) rn stmt.close();rn stmt = null;rn rn if(conn != null) rn conn.close();rn conn = null;rn rn catch (SQLException e) rn e.printStackTrace();rn rn rn rnrnrnrn[color=#FF0000]报错:[/color]com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2260)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:787)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:49)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:357)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at TestJDBC.main(TestJDBC.java:12)rnCaused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:344)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2181)rn ... 12 morernCaused by: java.net.ConnectException: Connection refused: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(Unknown Source)rn at java.net.PlainSocketImpl.connectToAddress(Unknown Source)rn at java.net.PlainSocketImpl.connect(Unknown Source)rn at java.net.SocksSocketImpl.connect(Unknown Source)rn at java.net.Socket.connect(Unknown Source)rn at java.net.Socket.connect(Unknown Source)rn at java.net.Socket.(Unknown Source)rn at java.net.Socket.(Unknown Source)rn at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:293)rn ... 13 morern
com.mysql.jdbc.CommunicationsException: Communications link failure due to under
我用的mysql+tomcat,用的proxool的数据库连接池,几分钟他就报一次这个错误,之前一直用这个,5天前出现的这个错误,持续报错后tomcat就down掉,那位高人能帮忙解决下?rn2009-9-29 9:56:42 org.logicalcobwebs.proxool.Prototyper sweeprn严重: Prototyperncom.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: rnrn** BEGIN NESTED EXCEPTION ** rnrnjava.net.SocketExceptionrnMESSAGE: java.net.ConnectException: Connection refused: connectrnrnSTACKTRACE:rnrnjava.net.SocketException: java.net.ConnectException: Connection refused: connectrn at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)rn at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)rn at com.mysql.jdbc.Connection.(Connection.java:1485)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)rn at java.sql.DriverManager.getConnection(DriverManager.java:525)rn at java.sql.DriverManager.getConnection(DriverManager.java:140)rn at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.java:39)rn at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)rn at org.logicalcobwebs.proxool.Prototyper.sweep(Prototyper.java:102)rn at org.logicalcobwebs.proxool.PrototyperThread.run(PrototyperThread.java:44)rnrnrn** END NESTED EXCEPTION **rnrnrnrnLast packet sent to the server was 0 ms ago.rn at com.mysql.jdbc.Connection.createNewIO(Connection.java:2621)rn at com.mysql.jdbc.Connection.(Connection.java:1485)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)rn at java.sql.DriverManager.getConnection(DriverManager.java:525)rn at java.sql.DriverManager.getConnection(DriverManager.java:140)rn at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.java:39)rn at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)rn at org.logicalcobwebs.proxool.Prototyper.sweep(Prototyper.java:102)rn at org.logicalcobwebs.proxool.PrototyperThread.run(PrototyperThread.java:44)rn
我们是很有底线的