SSL错误

最近在使用数据库是报以下错误

Fri Jan 18 10:10:26 CST 2019 WARN: Caught while disconnecting...

EXCEPTION STACK TRACE:

 

** BEGIN NESTED EXCEPTION **

javax.net.ssl.SSLException
MESSAGE: closing inbound before receiving peer's close_notify

STACKTRACE:

javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)
    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255)
    at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:645)
    at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:624)
    at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1312)
    at com.mysql.cj.NativeSession.quit(NativeSession.java:182)
    at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750)
    at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720)
    at org.apache.commons.dbcp2.DelegatingConnection.closeInternal(DelegatingConnection.java:239)
    at org.apache.commons.dbcp2.PoolableConnection.reallyClose(PoolableConnection.java:232)
    at org.apache.commons.dbcp2.PoolableConnectionFactory.destroyObject(PoolableConnectionFactory.java:367)
    at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2402)
    at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2381)
    at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2110)
    at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1563)
    at org.apache.commons.dbutils.AbstractQueryRunner.prepareConnection(AbstractQueryRunner.java:319)
    at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:345)
    at com.lee.gjp.dao.ZhangWuDao.selectAll(ZhangWuDao.java:18)
    at com.lee.gjp.service.ZhangWuService.selectAll(ZhangWuService.java:13)
    at com.lee.gjp.controller.ZhangWuController.selectAll(ZhangWuController.java:12)
    at com.lee.gjp.view.MainView.selectAll(MainView.java:70)
    at com.lee.gjp.view.MainView.selectZhangwu(MainView.java:48)
    at com.lee.gjp.view.MainView.run(MainView.java:31)
    at com.lee.gjp.app.MainApp.main(MainApp.java:8)


** END NESTED EXCEPTION **


Fri Jan 18 10:10:26 CST 2019 WARN: Caught while disconnecting...

EXCEPTION STACK TRACE:

 

** BEGIN NESTED EXCEPTION **

javax.net.ssl.SSLException
MESSAGE: closing inbound before receiving peer's close_notify

STACKTRACE:

javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)
    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255)
    at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:645)
    at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:624)
    at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1312)
    at com.mysql.cj.NativeSession.quit(NativeSession.java:182)
    at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750)
    at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720)
    at org.apache.commons.dbcp2.DelegatingConnection.closeInternal(DelegatingConnection.java:239)
    at org.apache.commons.dbcp2.PoolableConnection.reallyClose(PoolableConnection.java:232)
    at org.apache.commons.dbcp2.PoolableConnectionFactory.destroyObject(PoolableConnectionFactory.java:367)
    at org.apache.commons.pool2.impl.GenericObjectPool.destroy(GenericObjectPool.java:921)
    at org.apache.commons.pool2.impl.GenericObjectPool.returnObject(GenericObjectPool.java:584)
    at org.apache.commons.dbcp2.PoolableConnection.close(PoolableConnection.java:200)
    at org.apache.commons.dbcp2.DelegatingConnection.closeInternal(DelegatingConnection.java:239)
    at org.apache.commons.dbcp2.DelegatingConnection.close(DelegatingConnection.java:210)
    at org.apache.commons.dbcp2.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:247)
    at org.apache.commons.dbutils.DbUtils.close(DbUtils.java:60)
    at org.apache.commons.dbutils.AbstractQueryRunner.close(AbstractQueryRunner.java:572)
    at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:399)
    at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:347)
    at com.lee.gjp.dao.ZhangWuDao.selectAll(ZhangWuDao.java:18)
    at com.lee.gjp.service.ZhangWuService.selectAll(ZhangWuService.java:13)
    at com.lee.gjp.controller.ZhangWuController.selectAll(ZhangWuController.java:12)
    at com.lee.gjp.view.MainView.selectAll(MainView.java:70)
    at com.lee.gjp.view.MainView.selectZhangwu(MainView.java:48)
    at com.lee.gjp.view.MainView.run(MainView.java:31)
    at com.lee.gjp.app.MainApp.main(MainApp.java:8)


** END NESTED EXCEPTION **


查阅发现在jdbcurl后面加上useSSL=false就可以了"jdbc:mysql://localhost:3306/gjp?useSSL=false"

你可能感兴趣的:(SSL错误)