java.sql.SQLException:无法检索转换只读状态服务器并花费几个小时让persist返回失败

时间:2018-01-29 08:19:15

标签: mysql

几个小时后插入查询失败了....

这里是错误日志:

  

引起:java.sql.SQLException:无法检索转换   只读状态服务器       在com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)~ [mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.SQLError.createSQLException(SQLError.java:973)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.SQLError.createSQLException(SQLError.java:949)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3976)   〜[MySQL的连接器的Java-5.1.30.jar:NA]       在com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3947)   〜[MySQL的连接器的Java-5.1.30.jar:NA]       在com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2295)   〜[MySQL的连接器的Java-5.1.30.jar:NA]       在com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2262)   〜[MySQL的连接器的Java-5.1.30.jar:NA]       在com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2246)   〜[MySQL的连接器的Java-5.1.30.jar:NA]       at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:1449)   〜[c3p0-0.9.5.jar:0.9.5]       at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)   〜[休眠核-4.3.10.Final.jar:4.3.10.Final]       ...省略了37个常见帧引起:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:   通信链路故障

     

从服务器成功收到的最后一个数据包是8,378,053   几毫秒之前。成功发送到服务器的最后一个数据包是   8,378,052毫秒之前。       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)〜[na:1.8.0_40]       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)   〜[NA:1.8.0_40]       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)   〜[NA:1.8.0_40]       at java.lang.reflect.Constructor.newInstance(Constructor.java:422)〜[na:1.8.0_40]       在com.mysql.jdbc.Util.handleNewInstance(Util.java:409)〜[mysql-connector-java-5.1.30.jar:na]       at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127)   〜[MySQL的连接器的Java-5.1.30.jar:NA]       在com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3715)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3604)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4155)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2781)〜[mysql-connector-java-5.1.30.jar:na]       在com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1569)   〜[MySQL的连接器的Java-5.1.30.jar:NA]       在com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3970)   〜[MySQL的连接器的Java-5.1.30.jar:NA]       ...省略了43个常见帧引起的:java.net.SocketException:连接超时       at java.net.SocketInputStream.socketRead0(Native Method)〜[na:1.8.0_40]

0 个答案:

没有答案