I'm connected to a corporate network and getting this error when trying to deploy to salesforce using Ant.
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
There isn't a proxy server in my internet options and I'm able to use Dataloader while connected to this same network. Why could this be happening?
Update I'm using Ant 1.10.1 with jdk 1.8.0_131 and salesforce-ant-39 or salesforce-ant-40
Update I feel like this should work https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ#36427118
I downloaded the certificate using chrome from https://test.salesforce.com. Then I imported it to cacerts keystore. My java application will work maybe 10% of the time but every other time I get the exception.