Caused by: java.io.EOFException: Can not read response from server.

1、错误描述

The last packet successfully received from the server was 76,997 milliseconds ago.  The last packet sent successfully to the server was 78,995 

milliseconds ago.
	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:411)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
	at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2144)
	at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1900)
	at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3401)
	at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:483)
	at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3096)
	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2266)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2687)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2318)
	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
	at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
	at $java.sql.Wrapper$$EnhancerByProxool$$8d43c634.executeQuery(<generated>)
	at base.dao.impl.BaseDaoImpl$2.execute(BaseDaoImpl.java:185)
	at base.dao.impl.BaseDaoImpl$2.execute(BaseDaoImpl.java:1)
	at org.hibernate.jdbc.WorkExecutor.executeReturningWork(WorkExecutor.java:72)
	at org.hibernate.internal.SessionImpl$3.accept(SessionImpl.java:2052)
	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:313)
	... 82 more
Caused by: java.io.EOFException: Can not read response from server. Expected to read 5 bytes, read 3 bytes before connection was unexpectedly 

lost.
	at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3017)
	at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2125)
	... 102 more

2、错误原因

错误提示:不能从服务器获取响应,即因为某种原因导致数据库服务器连接失败

3、解决办法

检查数据库连接情况,确保正常连接

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-08-06 07:56:36

Caused by: java.io.EOFException: Can not read response from server.的相关文章

Caused by java io EOFException Can not read response from

1.错误描述 The last packet successfully received from the server was 76,997 milliseconds ago. The last packet sent successfully to the server was 78,995 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.ref

tomcat链接mysql时超时报错java.io.EOFException: Can not read response from server. Expected to read 4 bytes,

需要在配置文件里加上下面就ok了 <property name=”minEvictableIdleTimeMillis” value=”1800000″ /> <property name=”numTestsPerEvictionRun” value=”3″ /> <property name=”testOnBorrow” value=”true” /> <property name=”testWhileIdle” value=”true” /> <p

java.io.IOException: java.io.EOFException: Unexpected end of input stream错误

报错现象: Diagnostic Messages for this Task:Error: java.io.IOException: java.io.EOFException: Unexpected end of input stream at org.apache.hadoop.hive.io.HiveIOExceptionHandlerChain.handleRecordReaderNextException(HiveIOExceptionHandlerChain.java:121) at

storm supervisor启动报错java.lang.RuntimeException: java.io.EOFException

storm因机器断电或其他异常导致的supervisor意外终止,再次启动时报错: 1. 2013-09-24 09:15:44,361 INFO [main] daemon.supervisor (NO_SOURCE_FILE:invoke(0)) - Starting supervisor with id 74332654-8925-48a1-b67b-7eacaa52aeca at host hadoop02 2. 2013-09-24 09:15:45,246 ERROR [Thread

java.io.EOFException

使用webclient抓取网页时报错:java.io.EOFException atjava.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:207) atjava.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:197) atjava.util.zip.GZIPInp使用webclient抓取网页时报错: java.io.EOFException at java.u

Caused by: java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be ope

1.错误描述 java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99) at org.springframework.test.context.DefaultTestContext.

严重:IOException while loading persisted sessions:java.io.EOFException.

1.错误描述 java.io.EOFException 2.错误原因 由于项目在运行的过程中,异常地关闭了Tomcat,在项目文件下生成了SESSIONS.ser D:\MyEclipse\apache-tomcat-7.0.55\work\Catalina\localhost\SSH 3.解决办法 删除在该路径下的SESSIONS.ser文件,重新启动Tomcat,项目就会正常运行

【转】Tomcat出现SEVERE: IOException while loading persisted sessions: java.io.EOFException java.io.EOFException问题的解决方案

[java] view plaincopy 错误代码如下: 严重: IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2325) at java.io.ObjectInputStream$BlockDataInputS

Android HttpsUrlConnection eofexception --&gt; java.io.EOFException

05-15 17:32:51.624: W/System.err(9851): java.io.EOFException 05-15 17:32:51.694: W/System.err(9851): at libcore.io.Streams.readAsciiLine(Streams.java:203) 05-15 17:32:51.694: W/System.err(9851): at libcore.net.http.HttpEngine.readResponseHeaders(Http