0
votes

org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I am getting the baove exception, i know it is because it is not able to find the certificates.

when i created a new JKS file with only the certificate enteries provided by the 3rd party and setting in system.setProperty("javax.net.XXXX") it works. But due to this my other functionalities in application does not work as it is not able to find any certificate. so i created jssecacerts using class file and imported the two certificates as well, but pointing and setting in system properties this jssecaerts file, it does not work and rest everything works fine.

What could be the issue..???

1

1 Answers

0
votes

You could add your additional certificates for use by Axis2 in your own X509TrustManager and build an SSLContext from it. This is described in this answer.

Then you would have to pass the subsequent SSLSocketFactory to Axis2 using an Apache HttpClient 3.x SecureProtocolSocketFactory (see the Axis 2 documentation on the subject).