当前位置: 代码迷 >> J2SE >> com.mysql.jdbc.CommunicationsException这个异常是什么原因引起的
  详细解决方案

com.mysql.jdbc.CommunicationsException这个异常是什么原因引起的

热度:305   发布时间:2016-04-24 16:38:08.0
com.mysql.jdbc.CommunicationsException这个错误是什么原因引起的
我用的是MYSQL   +Resin
程序运行了一段时间后,就偶然会报出下面的错误:
[2007-03-31   22:49:33]   com.mysql.jdbc.CommunicationsException:   Communications   link   failure   due   to   underlying   exception:  
[2007-03-31   22:49:33]  
[2007-03-31   22:49:33]   **   BEGIN   NESTED   EXCEPTION   **  
[2007-03-31   22:49:33]  
[2007-03-31   22:49:33]   java.io.EOFException
[2007-03-31   22:49:33]  
[2007-03-31   22:49:33]   STACKTRACE:
[2007-03-31   22:49:33]  
[2007-03-31   22:49:33]   java.io.EOFException
[2007-03-31   22:49:33]       at   com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)
[2007-03-31   22:49:33]       at   com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2304)
[2007-03-31   22:49:33]       at   com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803)
[2007-03-31   22:49:33]       at   com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
[2007-03-31   22:49:33]       at   com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
[2007-03-31   22:49:33]       at   com.mysql.jdbc.Connection.execSQL(Connection.java:3176)
[2007-03-31   22:49:33]       at   com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1153)
[2007-03-31   22:49:33]       at   com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1266)
[2007-03-31   22:49:33]       at   com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:108)
[2007-03-31   22:49:33]       at   com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:108)
[2007-03-31   22:49:33]       at   ayou.db.BASE.getDataWithException(BASE.java:301)
[2007-03-31   22:49:33]       at   ayou.db.BASE.getData(BASE.java:274)
[2007-03-31   22:49:33]       at   com.tom.tech.cms.analytics.ArticleIndexdb.getNewListAll(ArticleIndexdb.java:42)
[2007-03-31   22:49:33]       at   com.tom.tech.cms.analytics.BackupActicle.getNewList(BackupActicle.java:46)
[2007-03-31   22:49:33]       at   com.tom.tech.cms.analytics.BackupActicle.setAllNewList(BackupActicle.java:60)
[2007-03-31   22:49:33]       at   _jsp._analytics._test__jsp._jspService(_test__jsp.java:41)
[2007-03-31   22:49:33]       at   com.caucho.jsp.JavaPage.service(JavaPage.java:60)
[2007-03-31   22:49:33]       at   com.caucho.jsp.Page.pageservice(Page.java:570)
[2007-03-31   22:49:33]       at   com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179)
[2007-03-31   22:49:33]       at   com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
[2007-03-31   22:49:33]       at   com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
[2007-03-31   22:49:33]       at   com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:420)
[2007-03-31   22:49:33]       at   com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
[2007-03-31   22:49:33]       at   com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
[2007-03-31   22:49:33]       at   com.caucho.util.ThreadPool.run(ThreadPool.java:442)
  相关解决方案