1

I have an enterprise edition free org. This has API access as I have connected to it over Postman via a connected app that I created. The problem I'm facing is that I want to connect to this org over a Java application that is also still in development in my local machine.

I have generated the necessary stubs from Enterprise, Metadata, Tooling WSDLs. I'm trying to login to the org through the EnterpriseConnection object. But I keep getting a "PKIX path building failed" error.

Full error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

So, I also tried to create a Self-signed cert, and imported it in my java project. Still the same error.

I also exported the Keystore from my enterprise org and used in my Java project. still the same error,

Has someone here connected using a Self-signed cert to an org? How would I go about establishing the connection?

Please let me know if and why this does not deserve to be a question instead of downvoting, would help me ask better!

Thanks!

1
  • Really is confusing why questions are downvoted without any explanation. It would really help me frame better if downvoters also tell me why. Commented Mar 22 at 6:43

1 Answer 1

0

NVM, figured this out.

I had to get all the certificates needed to for the chain.

To do this, go to the org, click on the URL > View Site Information > Connection is Secure > Certificate is Valid

once you see a pop-up, click on the 'Details' tab and you will find an option to 'Export'

I exported all of the certificates into my project.

Once done, you can import these .crt files to a new krystore of your project.

Once you import them, you can use this .jks in your client.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .