报错:
Exception in thread "main" org.neo4j.driver.v1.exceptions.ClientException: Unable to process request: General SSLEngine problem
at org.neo4j.driver.internal.connector.socket.SocketClient.start(SocketClient.java:87)
at org.neo4j.driver.internal.connector.socket.SocketConnection.(SocketConnection.java:63)
at org.neo4j.driver.internal.connector.socket.SocketConnector.connect(SocketConnector.java:52)
at org.neo4j.driver.internal.pool.InternalConnectionPool$1.allocate(InternalConnectionPool.java:191)
at org.neo4j.driver.internal.pool.InternalConnectionPool$1.allocate(InternalConnectionPool.java:180)
at org.neo4j.driver.internal.pool.ThreadCachingPool.allocate(ThreadCachingPool.java:212)
at org.neo4j.driver.internal.pool.ThreadCachingPool.acquireFromGlobal(ThreadCachingPool.java:164)
at org.neo4j.driver.internal.pool.ThreadCachingPool.acquire(ThreadCachingPool.java:118)
at org.neo4j.driver.internal.pool.InternalConnectionPool.acquire(InternalConnectionPool.java:109)
at org.neo4j.driver.internal.InternalDriver.session(InternalDriver.java:53)
at iie.ac.cn.neo4jBolt.App.main(App.java:13)
Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1362)
at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:513)
at sun.security.ssl.SSLEngineImpl.writeAppRecord(SSLEngineImpl.java:1177)
at sun.security.ssl.SSLEngineImpl.wrap(SSLEngineImpl.java:1149)
at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:469)
at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.wrap(TLSSocketChannel.java:270)
at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.runHandshake(TLSSocketChannel.java:131)
at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.(TLSSocketChannel.java:95)
at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.(TLSSocketChannel.java:77)
at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.(TLSSocketChannel.java:70)
at org.neo4j.driver.internal.connector.socket.SocketClient$ChannelFactory.create(SocketClient.java:235)
at org.neo4j.driver.internal.connector.socket.SocketClient.start(SocketClient.java:74)
... 10 more
Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1683)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:278)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:270)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1341)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:153)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:808)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:806)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1299)
at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.runDelegatedTasks(TLSSocketChannel.java:142)
at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.unwrap(TLSSocketChannel.java:203)
at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.runHandshake(TLSSocketChannel.java:127)
... 15 more
Caused by: java.security.cert.CertificateException: Unable to connect to neo4j at `localhost:7687`, because the certificate the server uses has changed. This is a security feature to protect against man-in-the-middle attacks.
If you trust the certificate the server uses now, simply remove the line that starts with `localhost:7687` in the file `C:\Users\Frank\.neo4j\known_hosts`.
The old certificate saved in file is:
-----BEGIN CERTIFICATE-----
2bbc81688243fcb25943f8928f455c5bba6f3e623e9d8616d5be95051c96dffe
3f0eb70a6a7474985f2b00ed1d3240d064f920d68a52d90a62eca4eb59fc83b
-----END CERTIFICATE-----
The New certificate received is:
-----BEGIN CERTIFICATE-----
2bbc81688243fcb25943f8928f455c5bba6f3e623e9d8616d5be95051c96dffe
3f0eb70a6a7474985f2b00ed1d3240d064f920d68a52d90a62eca4eb59fc83b5
-----END CERTIFICATE-----
at org.neo4j.driver.internal.connector.socket.TrustOnFirstUseTrustManager.checkServerTrusted(TrustOnFirstUseTrustManager.java:153)
at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:827)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1328)