将SSLContext设置为org.apache.olingo.client.api.ODataClient

时间:2018-05-04 08:51:24

标签: java olingo

我有loadODataResources的错误跟随错误。

org.apache.olingo.client.api.http.HttpClientException: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake 

1 个答案:

答案 0 :(得分:0)

该错误似乎与SSL连接握手有关。通常,我会使用env变量来自定义SSLContext。对于您而言,“ https.protocols”可能会有所帮助,例如:

System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");

请参阅以下参考资料以获取更多详细信息:

  1. Remote host closed connection during handshake when using in multithreaded environement #748
  2. Diagnosing TLS, SSL, and HTTPS
  3. JDK 9's JSSE doc