• 微信公众号:美女很有趣。 工作之余,放松一下,关注即送10G+美女照片!

WARN: Caught while disconnecting… EXCEPTION STACK TRACE: ** BEGIN NESTED EXCEPTION **

开发技术 开发技术 3小时前 2次浏览

**idea在运行完jdbc后出现**

报错信息如下:

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 sun.security.ssl.Alert.createSSLException(Alert.java:133)
at sun.security.ssl.Alert.createSSLException(Alert.java:117)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:340)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:296)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:287)
at sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:737)
at sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:716)
at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:2249)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4232)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1472)
at com.kuang.test.TestJdbc.main(TestJdbc.java:39)

** END NESTED EXCEPTION **

 

解决方案:

“`java
String url = “jdbc:mysql://localhost:3306/jdbc?useUnicode=true&characterEncoding=utf8″;
“`

改成

“`java
String url = “jdbc:mysql://localhost:3306/jdbc?useUnicode=true&characterEncoding=utf8&useSSL=false”;
“`

完美解决!!


喜欢 (0)