1 Reply Latest reply on Oct 28, 2005 1:50 AM by Anil Saldanha

    SSLHandshakeException when trying to call Webservice as a cl

    jggreenjr Newbie

      I currently have an application that is trying to call a client webservice with https. When I call the client I get the following exception:
      javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors

      I have used the keytool to import the client sercurity certificate into my truststore using the directions from sun (http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Debug).
      Additionally, I have tried to follow the instructions from other posts referring to this. These being:
      http://www.jboss.org/?module=bb&op=viewtopic&t=70915

      When I set the suggested property settings in the code. I still get the same error. Here is the code to set the property settings:
      String urlString = configMap.getProperty("g2b.url.search");
      System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
      System.setProperty("javax.net.ssl.keyStore", "D:/jdk1.5.0_01/jre/lib/security/cacerts");
      System.setProperty("javax.net.ssl.keyStorePassword","changeit");
      System.setProperty("javax.net.ssl.trustStore","D:/jdk1.5.0_01/jre/lib/security/cacerts");
      System.setProperty("javax.net.ssl.trustStorePassword","changeit");

      URL url = new URL(urlString);

      Has anyone run into the same problem? Can someone help give me some more suggestions?

      We are currently running jdk 1.5 with Jboss 4.01 SP1 and consuming the WSDL with Axis 1.2 (to do this we have removed the ws4ee.sar from our JBoss installation).


      Thanks,

      John Green