function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mrunali GaonkarMrunali Gaonkar 

PKIX path building failed while consuming SOAP WSDL

Hi,
     The error is System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at line
 SoapBindingStub bind = (SoapBindingStub) new SforceServiceLocator().getSoap();

But only in production - it works fine in the sandbox.What are the possible reasons ans solutions for this?
please help.
ShashankShashank (Salesforce Developers) 
You have to check the whole certificate chain and check if all are trusted and valid. Please see if this helps: http://salesforce.stackexchange.com/questions/5603/why-do-i-get-pkix-path-building-failed-exception-with-my-callout