cancel
Showing results for 
Search instead for 
Did you mean: 

java Rpc call causes a "PKIX path building failed" runtime error

0 Kudos

Hi,

I want to call a remote function from a Java EJB. Here I'm using the org.apache.xmlrpc.client. Trying to call the server with a HTTP connection works perfect. Using HTTPS I'm getting the runtim error below.

How do I have to install the certificates on SAP netweaver envrionment running with a SAP PI 7.3 ?

I hope that somebody can give my  a hint ...

Error in retrieveAuditData() during rp call:de.metro.finanzen.adaptermodule.inbound.plugins.Plugin6100Error message will be added into parserResult.org.apache.xmlrpc.XmlRpcException: I/O error while communicating with HTTP server: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.apache.xmlrpc.client.XmlRpcCommonsTransport.writeRequest(XmlRpcCommonsTransport.java:244)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:151)
...

Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:172)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1863)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:267)

Thank you in advance

Christian

Accepted Solutions (0)

Answers (1)

Answers (1)

christian_santej
Active Participant
0 Kudos

Hi Christian,

Have a look at the this post

Regards,

Christian

0 Kudos

Thank you for this hint.

I performed every step and now I'm able to create a HTTPS connection with the SAP SecureConnectionFactory to download a HTML file from this server.

The apache.xmlrpc client still receives the certificate error. I fear that the client doesn't use the SAP NWA keystore ?

christian_santej
Active Participant
0 Kudos

You're welcome.

Did you perform a restart afterwards (it might need one)? Also i'm not familiar with apache.xmlrpc - maybe the api documentation or further research on this issue might help.

@ restart:

  • Variant 1: In the netweaver administration (http://<host>:<port>/nwa) search for "Start & Stop"; select the Services tab; search for SSL Provider and perform a restart
  • Variant 2: Restart your netweaver system

Regards,

Christian