title: Getting SSLHandshakeException error after several hours of successful API calls
body: <p>I have created web-service to make payments via PayPal payment provider. </p>
  
  <p>The <code>*.war</code> file is deployed on Test environment, where it is running on WildFly (8.2.1.Final) server. After each deploy, I can make successful calls to PayPal side. But after several hours I'm starting to get  <code>javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found</code>exception, which is very weird. I know that PayPal uses CA-signed certificates, so I don't need to import any of them.</p>
  
  <pre><code>Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
      at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[?:?]
      at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) ~[?:?]
      at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) ~[?:?]
      at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) ~[?:?]
      at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) ~[?:?]
      at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[?:?]
      at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:?]
      at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:?]
      at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[?:?]
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[?:?]
      at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) ~[?:?]
      at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ~[?:?]
      at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) ~[?:?]
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:?]
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283) ~[?:?]
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258) ~[?:?]
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[?:?]
  </code></pre>
  
  <p>Could anyone explain what could be the reason of this issue and how can I solve it?</p>