org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection总结

最近,我们有几个系统频繁的出现org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection异常,特整理总结如下。

通常会伴随两类错误,第一类为:

INFO | jvm 1 | 2017/03/20 18:17:44 | ### The error occurred while executing a query
INFO | jvm 1 | 2017/03/20 18:17:44 | ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot get a connection
, pool error Timeout waiting for idle object
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
INFO | jvm 1 | 2017/03/20 18:17:44 | at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
INFO | jvm 1 | 2017/03/20 18:17:44 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2017/03/20 18:17:44 | at java.lang.reflect.Method.invoke(Method.java:497)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
INFO | jvm 1 | 2017/03/20 18:17:44 | ... 18 more
INFO | jvm 1 | 2017/03/20 18:17:44 | Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot get a connection
, pool error Timeout waiting for idle object
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:81)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
INFO | jvm 1 | 2017/03/20 18:17:44 | ... 23 more
INFO | jvm 1 | 2017/03/20 18:17:44 | Caused by: java.sql.SQLException: Cannot get a connection, pool error Timeout waiting for idle object
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:142)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
INFO | jvm 1 | 2017/03/20 18:17:44 | ... 33 more
INFO | jvm 1 | 2017/03/20 18:17:44 | Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:449)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
INFO | jvm 1 | 2017/03/20 18:17:44 | at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134)
INFO | jvm 1 | 2017/03/20 18:17:44 | ... 36 more

对应c3p0为:

Caused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:527)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)

这通常要么连接有泄漏,没有及时释放;要么连接配置确实过低;要么SQL性能差,每次占用时间长。

==========================另外一类:

INFO | jvm 1 | 2017/03/20 17:29:06 | Caused by: org.apache.ibatis.exceptions.PersistenceException:
INFO | jvm 1 | 2017/03/20 17:29:06 | ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.excep
tions.jdbc4.CommunicationsException: Communications link failure
INFO | jvm 1 | 2017/03/20 17:29:06 |
INFO | jvm 1 | 2017/03/20 17:29:06 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
INFO | jvm 1 | 2017/03/20 17:29:06 | ### The error may exist in URL [jar:file:/usr/local/src/osm-all/services/osm-secuact-service-impl-1.5.31.0315-RELEASE.jar!/com/ld/net/secuact/mapper/SecuritiesAccountM
apper.xml]
INFO | jvm 1 | 2017/03/20 17:29:06 | ### The error may involve com.ld.net.secuact.dao.ISecuritiesAccountDao.funcl_QueryUniteQuitiesPosition
INFO | jvm 1 | 2017/03/20 17:29:06 | ### The error occurred while executing a query
INFO | jvm 1 | 2017/03/20 17:29:06 | ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.Communications
Exception: Communications link failure
INFO | jvm 1 | 2017/03/20 17:29:06 |
INFO | jvm 1 | 2017/03/20 17:29:06 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
INFO | jvm 1 | 2017/03/20 17:29:06 | at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
INFO | jvm 1 | 2017/03/20 17:29:06 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.lang.reflect.Method.invoke(Method.java:498)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
INFO | jvm 1 | 2017/03/20 17:29:06 | ... 18 more
INFO | jvm 1 | 2017/03/20 17:29:06 | Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.Communications
Exception: Communications link failure
INFO | jvm 1 | 2017/03/20 17:29:06 |
INFO | jvm 1 | 2017/03/20 17:29:06 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:81)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
INFO | jvm 1 | 2017/03/20 17:29:06 | ... 23 more
INFO | jvm 1 | 2017/03/20 17:29:06 | Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
INFO | jvm 1 | 2017/03/20 17:29:06 |

通常来说,Communications link failure会有两种额外的补充上下文信息,如下:


INFO | jvm 1 | 2017/03/20 17:29:06 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

The last packet successfully received from the server was 1,583 milliseconds ago.  The last packet sent successfully to the server was 1,583 milliseconds ago.

 

这两错误信息可以说是通过com.mysql.jdbc.SQLError.createLinkFailureMessageBasedOnHeuristics抛出的:

    public static String createLinkFailureMessageBasedOnHeuristics(MySQLConnection conn, long lastPacketSentTimeMs, long lastPacketReceivedTimeMs,
            Exception underlyingException) {
        long serverTimeoutSeconds = 0;
        boolean isInteractiveClient = false;

        if (conn != null) {
            isInteractiveClient = conn.getInteractiveClient();

            String serverTimeoutSecondsStr = null;

            if (isInteractiveClient) {
                serverTimeoutSecondsStr = conn.getServerVariable("interactive_timeout");
            } else {
                serverTimeoutSecondsStr = conn.getServerVariable("wait_timeout");
            }

            if (serverTimeoutSecondsStr != null) {
                try {
                    serverTimeoutSeconds = Long.parseLong(serverTimeoutSecondsStr);
                } catch (NumberFormatException nfe) {
                    serverTimeoutSeconds = 0;
                }
            }
        }

        StringBuilder exceptionMessageBuf = new StringBuilder();

        long nowMs = System.currentTimeMillis();

        if (lastPacketSentTimeMs == 0) {
            lastPacketSentTimeMs = nowMs;
        }

        long timeSinceLastPacketSentMs = (nowMs - lastPacketSentTimeMs);
        long timeSinceLastPacketSeconds = timeSinceLastPacketSentMs / 1000;

        long timeSinceLastPacketReceivedMs = (nowMs - lastPacketReceivedTimeMs);

        int dueToTimeout = DUE_TO_TIMEOUT_FALSE;

        StringBuilder timeoutMessageBuf = null;

        if (serverTimeoutSeconds != 0) {
            if (timeSinceLastPacketSeconds > serverTimeoutSeconds) {
                dueToTimeout = DUE_TO_TIMEOUT_TRUE;

                timeoutMessageBuf = new StringBuilder();

                timeoutMessageBuf.append(Messages.getString("CommunicationsException.2"));

                if (!isInteractiveClient) {
                    timeoutMessageBuf.append(Messages.getString("CommunicationsException.3"));
                } else {
                    timeoutMessageBuf.append(Messages.getString("CommunicationsException.4"));
                }

            }
        } else if (timeSinceLastPacketSeconds > DEFAULT_WAIT_TIMEOUT_SECONDS) {
            dueToTimeout = DUE_TO_TIMEOUT_MAYBE;

            timeoutMessageBuf = new StringBuilder();

            timeoutMessageBuf.append(Messages.getString("CommunicationsException.5"));
            timeoutMessageBuf.append(Messages.getString("CommunicationsException.6"));
            timeoutMessageBuf.append(Messages.getString("CommunicationsException.7"));
            timeoutMessageBuf.append(Messages.getString("CommunicationsException.8"));
        }

        if (dueToTimeout == DUE_TO_TIMEOUT_TRUE || dueToTimeout == DUE_TO_TIMEOUT_MAYBE) {

            if (lastPacketReceivedTimeMs != 0) {
                Object[] timingInfo = { Long.valueOf(timeSinceLastPacketReceivedMs), Long.valueOf(timeSinceLastPacketSentMs) };
                exceptionMessageBuf.append(Messages.getString("CommunicationsException.ServerPacketTimingInfo", timingInfo));
            } else {
                exceptionMessageBuf.append(
                        Messages.getString("CommunicationsException.ServerPacketTimingInfoNoRecv", new Object[] { Long.valueOf(timeSinceLastPacketSentMs) }));
            }

            if (timeoutMessageBuf != null) {
                exceptionMessageBuf.append(timeoutMessageBuf);
            }

            exceptionMessageBuf.append(Messages.getString("CommunicationsException.11"));
            exceptionMessageBuf.append(Messages.getString("CommunicationsException.12"));
            exceptionMessageBuf.append(Messages.getString("CommunicationsException.13"));

        } else {
            //
            // Attempt to determine the reason for the underlying exception (we can only make a best-guess here)
            //

            if (underlyingException instanceof BindException) {
                if (conn.getLocalSocketAddress() != null && !Util.interfaceExists(conn.getLocalSocketAddress())) {
                    exceptionMessageBuf.append(Messages.getString("CommunicationsException.LocalSocketAddressNotAvailable"));
                } else {
                    // too many client connections???
                    exceptionMessageBuf.append(Messages.getString("CommunicationsException.TooManyClientConnections"));
                }
            }
        }

        if (exceptionMessageBuf.length() == 0) {
            // We haven't figured out a good reason, so copy it.
            exceptionMessageBuf.append(Messages.getString("CommunicationsException.20"));

            if (conn != null && conn.getMaintainTimeStats() && !conn.getParanoid()) { //可知, 都是从这里抛出来的, 不是因为server参数wait_timeout的原因, 而且我们使用的是默认值28800
                exceptionMessageBuf.append("\n\n");
                if (lastPacketReceivedTimeMs != 0) {
                    Object[] timingInfo = { Long.valueOf(timeSinceLastPacketReceivedMs), Long.valueOf(timeSinceLastPacketSentMs) };
                    exceptionMessageBuf.append(Messages.getString("CommunicationsException.ServerPacketTimingInfo", timingInfo));
                } else {
                    exceptionMessageBuf.append(Messages.getString("CommunicationsException.ServerPacketTimingInfoNoRecv",
                            new Object[] { Long.valueOf(timeSinceLastPacketSentMs) }));
                }
            }
        }

        return exceptionMessageBuf.toString();
    }

 

对于该异常,又有三种情况:

1、没有伴随其他异常。这一种通常是比较难解释或者目前网上为止还没有特别详解或者解释没有说服力的(比如由于数据库回收了连接,而系统的连接池不知道,继续使用被回收的连接所致的,我们测试系统重启不到2小时出现了该问题、同时dbcp连接也增加了validationQuery等验证;有说升级到5.1.38后的,我们是使用的是5.1.39;有说防火墙的,我们没开防火墙)。

2、伴随着ConnectException;对于ConnectException,又分为Connection refused和Connection reset。Connection refused通常是网络不通、或者库shutdown了,也可能starting。Connection reset通常是库正在shutdown,也可能starting。

3、伴随着java.io.EOFException。这一种,不用特别解释。

INFO | jvm 1 | 2017/03/20 17:29:06 | at sun.reflect.GeneratedConstructorAccessor106.newInstance(Unknown Source)
INFO | jvm 1 | 2017/03/20 17:29:06 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:988)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2251)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2284)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2083)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
INFO | jvm 1 | 2017/03/20 17:29:06 | at sun.reflect.GeneratedConstructorAccessor25.newInstance(Unknown Source)
INFO | jvm 1 | 2017/03/20 17:29:06 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
INFO | jvm 1 | 2017/03/20 17:29:06 | at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
INFO | jvm 1 | 2017/03/20 17:29:06 | ... 33 more
INFO | jvm 1 | 2017/03/20 17:29:06 | Caused by: java.net.ConnectException: Connection refused
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.net.PlainSocketImpl.socketConnect(Native Method)
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
INFO | jvm 1 | 2017/03/20 17:29:06 | at java.net.Socket.connect(Socket.java:589)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
INFO | jvm 1 | 2017/03/20 17:29:06 | at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)
INFO | jvm 1 | 2017/03/20 17:29:06 | ... 53 more

或者:

Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3004)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:567)
... 54 more

Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:209)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:101)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:144)
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:174)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3001)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3462)
... 59 more

posted @ 2020-01-15 11:29  zhjh256  阅读(4590)  评论(0编辑  收藏  举报