Title: PKIX path building failed - SAP CPI Fix
URL: https://iglow.stellar-clouds.com/errors/pkix-path-building-failed.html
Author: Krishna Kishor Kammaje (SAP Mentor and SAP Press author. Founder of StellarClouds, where he builds iGlow.) https://www.linkedin.com/in/kammaje/
Published: 2026-12-01
Updated: 2026-12-01

# PKIX path building failed in SAP CPI

**Short answer:** This error means SAP CPI does not trust the certificate of the server it called. It usually happens when the server's root or intermediate certificate is missing from the tenant keystore, or was just renewed. To fix it, add those certificates in the Keystore monitor and run the TLS connectivity test.

## The problem

Your message fails at the receiver step and the log shows a long Java stack trace that ends in "unable to find valid certification path to requested target". The server works in your browser, so it is hard to see what CPI is unhappy about. Which certificate is missing? Root or intermediate? You export, upload, redeploy and wait, then find the chain was still incomplete.

## What does PKIX path building failed mean?

**PKIX path building failed** is a Java security error. CPI opened a secure connection (HTTPS, SOAP, SFTP over TLS and similar) and tried to check the server's certificate against the certificates in the tenant keystore. It could not build a chain from the server's certificate to a certificate it trusts, so it stopped before sending any data.

Full text in the log: `sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target`

## Why does it happen?

The most common cause comes first.

- The server uses a certificate from a certificate authority that is not in the tenant keystore. SAP's KBA [2715005](https://userapps.support.sap.com/sap/support/knowledge/en/2715005) describes this when you connect to a third-party server.
- The server renewed its certificate and the new chain has a new intermediate certificate.
- The server sends only its own certificate, not the intermediate one. Browsers can fill the gap. CPI cannot.

## How do I fix PKIX path building failed in SAP CPI?

1. Open the receiver URL in a browser and export the root and intermediate certificates as Base64 `.cer` files.
2. In Cloud Integration open **Monitor > Integrations and APIs > Manage Security > Keystore**.
3. Choose **Add > Certificate** and upload each file. Save.
4. Resend the failed message.

## How do I confirm it is fixed?

Open **Manage Security > Connectivity Tests > TLS**, enter the host and port, and tick **Valid Server Certificate Required** (see KBA [3574634](https://userapps.support.sap.com/sap/support/knowledge/en/3574634)). If the test is green, the chain is trusted.

## Which adapter or step causes it?

Any adapter that opens an outbound TLS connection: HTTP, SOAP, OData, Mail and others. The error appears at the receiver step.

## Tips to avoid it next time

Certificates expire and get renewed, so this error often returns months later. Note the expiry date of every receiver certificate you import. Import the full chain, not only the top certificate. If the call goes to a server you do not control, ask its owner to tell you before the certificate is renewed. For a deeper look at a failing call, [trace the message step by step](https://iglow.stellar-clouds.com/trace-message-sap-cpi.html).

## Related errors

- [statusCode: 401 (the server answered but refused the login)](https://iglow.stellar-clouds.com/errors/http-401-statuscode.html)
- [Content is not allowed in prolog (a non-XML answer reaches an XML step)](https://iglow.stellar-clouds.com/errors/content-not-allowed-in-prolog.html)
- [JSchException: Auth fail (SFTP login refused)](https://iglow.stellar-clouds.com/errors/jsch-auth-fail.html)

See all ten in [the 10 most common SAP CPI errors and how to fix each](https://iglow.stellar-clouds.com/common-sap-cpi-errors.html) for SAP Cloud Integration (SAP Integration Suite).

## The easy way: fix PKIX path building failed with iGlow

iGlow is an AI agent for SAP Integration Suite and CPI that runs as a Chrome extension side panel. The hunt above is what the Fix button does for you.

1. Open the panel on SAP Integration Suite. The failed message is listed with a Fix button.
2. Click **Fix**. iGlow reads the error and the failing receiver step and explains that the server's certificate chain is not trusted by the tenant keystore.
3. Follow the next steps it gives: which certificates to add in the Keystore monitor, and the TLS connectivity test to run. You add the certificates yourself, because iGlow does not add certificates to the keystore.

[Screenshot: iGlow Fix answer for the demo iFlow Invoice_S4_to_Ariba: why the last message failed (a null amount, line 5 of mapInvoiceToCXML.groovy), the proposed fix marked rejected, and two options]

What a Fix answer looks like: the root cause in plain words and options to choose from. This example is a different error, a null amount in a Groovy script. For a certificate error, iGlow explains the cause and lists next steps.

The Fix flow, shown on another error (a null amount in a Groovy mapping script in the demo iFlow Invoice_S4_to_Ariba): click Fix, read the cause, review the patch. In the clip the patch is rejected, so nothing changes. For a certificate error, iGlow gives next steps and does not change certificates.

Nothing is saved or deployed without your click, and tenants tagged PRD are never changed. See the [Fix failed messages guide](https://iglow.stellar-clouds.com/fix-failed-messages-sap-cpi.html). [Add iGlow to Chrome](https://chromewebstore.google.com/detail/iglow-for-sap-integration/mkadedhglleneaiicijielffdpjgcjlh?utm_source=iglow-site&utm_medium=body&utm_campaign=errors-pkix-path-building-failed).

## Questions

### What does PKIX path building failed mean?

It means CPI could not link the server's certificate to a certificate it trusts. The tenant keystore is missing a root or intermediate certificate.

### How do I fix PKIX path building failed in SAP CPI?

Export the server's root and intermediate certificates, add them in Manage Security > Keystore, and test with the TLS connectivity test.

### Which adapter or step causes PKIX path building failed?

Any receiver step that makes an outbound TLS connection, such as the HTTP, SOAP or OData receiver adapter.

## More from the blog and guides

- [Content is not allowed in prolog An XML step got something that is not XML](https://iglow.stellar-clouds.com/errors/content-not-allowed-in-prolog.html)
- [Cannot produce target element A required target field got no value](https://iglow.stellar-clouds.com/errors/cannot-produce-target-element.html)
- [JSchException: Auth fail The SFTP server refused the login](https://iglow.stellar-clouds.com/errors/jsch-auth-fail.html)
- [statusCode: 401 The receiver refused your credentials](https://iglow.stellar-clouds.com/errors/http-401-statuscode.html)
- [AI tools for SAP Integration Suite What exists in 2026 and what each is for](https://iglow.stellar-clouds.com/ai-tools-sap-integration-suite.html)
- [Create an iFlow with AI From a description or a spec to a deployed iFlow](https://iglow.stellar-clouds.com/create-iflow-with-ai.html)
- [Fix failed messages in SAP CPI Root cause, reviewed patch, one-click undo](https://iglow.stellar-clouds.com/fix-failed-messages-sap-cpi.html)
- [Test an iFlow with simulation Simulate changes, then send real test calls](https://iglow.stellar-clouds.com/test-iflow-simulation.html)
- [Trace a CPI message step by step Each step, its time, and where it failed](https://iglow.stellar-clouds.com/trace-message-sap-cpi.html)
- [Monitor Timer iFlows and JMS queues Missed Timer runs, waiting messages, failure hot spots](https://iglow.stellar-clouds.com/monitor-sap-cpi-timer-jms.html)
