title: Why can't I find the truststore for an SSL handshake?
body: <p>I'm using the Spring RESTTemplate on the client side to make calls to a REST endpoint. The client in this case is a Spring app and Tomcat is the servlet container. </p>
  
  <p>I'm running into issues making a connection to an HTTPS endpoint. I am receiving an error which indicates it cannot find a valid path to the truststore.  Where can I specify this? Is this done at the container level or the application config (Spring) level?</p>
  
  <p>Stack trace:</p>
  
  <pre><code>org.springframework.web.client.ResourceAccessException: I/O error:
  sun.security.validator.ValidatorException: PKIX path building failed:
  sun.security.provider.certpath.SunCertPathBuilderException:
  unable to find valid certification path to requested target;
  nested exception is javax.net.ssl.SSLHandshakeException:
  sun.security.validator.ValidatorException:
  PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
  unable to find valid certification path to requested target
  org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:330)
  org.springframework.web.client.RestTemplate.execute(RestTemplate.java:292)
  org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:227)
  </code></pre>