title: sun.security.validator.ValidatorException: PKIX path building failed when using SSLContext
body: <p>I'm trying to make an https soap request but I get this error :</p>
  
  <pre><code>Caused by: javax.net.ssl.SSLHandshakeException: SSLHandshakeException invoking *** : sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  </code></pre>
  
  <p>The probleme is when I use the system properties : </p>
  
  <pre><code>System.setProperty("javax.net.ssl.trustStore", certPath);
  System.setProperty("javax.net.ssl.trustStorePassword", certPasswd);
  </code></pre>
  
  <p>I don't get the error, but when I try to load the trust store manually it doesn't seem to work : </p>
  
  <pre><code>TrustManagerFactory tmFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
      KeyStore trustStore = KeyStore.getInstance("JKS");
      trustStore.load(new FileInputStream(certPath), certPasswd.toCharArray());
      tmFactory.init(trustStore);
  
      SSLContext sslContext = SSLContext.getInstance("SSLv3");
      sslContext.init(null , tmFactory.getTrustManagers(), null);
      bp.getRequestContext().put(JAXWSProperties.SSL_SOCKET_FACTORY, sslContext.getSocketFactory());
  </code></pre>
  
  <p>I get the exception mentioned above, any idea on how to solve it ?</p>