title: How to solve "unable to find valid certification path to requested target" with a server public certificate signed by a public CA authority?
body: <p>I have a web server that hosts a webaplication and rest APIs over HTTPS. There is a certificate for *.thedomain.com <strong>signed by Symantech installed on the server</strong>. "thedomain" is for the example purpose. It's not the actual domain. </p>
  
  <p>I think there is no problem with the trust chain, because the certificate provided by the server is accepted with the default setup of any browser without doing anything. </p>
  
  <p>Now I'm trying to create a client in Java for the rest API that's provided by this server.</p>
  
  <p>The problem is that a <code>sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path</code> to requested target is thrown. If I understand this correctly, it means that the ca supported by the JDK don't offer a valid certification path that allows to properly authentify the server.</p>
  
  <p>What would be a good solution to this error while still being able to authentify the server ?
  How comes the web browser are able to authentify the server and not the JDK (7) ?</p>