Webservices Connector Error

1
0
-1

Hi,

I am trying to access webservices from my environment.
I have the envelope and the necessary inputs which i use and try to hit a particular end point.
When i run the process, i get the following error

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 sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1917)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:301)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:295)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1369)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:156)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:925)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:860)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1043)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
at sun .protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
at sun protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1281)
at sun protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1256)
at sun protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:104)
... 19 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Is this something related to importing certificates in the server?
How can i import the certificates in the Bonita trusted CA's container on my server?

Regards,
A.

3 answers

1
0
-1

We need to import a certificate means we need to use :

keytool 
 -importcert 
 -file  
 -keystore  
 -alias ""

It will ask for a password. Type the password as changeit

Type Password : changeit

finally it will ask need to add {yes/no} :

type yes.

Note: Don't give blank space in location path

https://stackoverflow.com/questions/684081/importing-ssl-certificate-int...

1
0
-1

I have the same problem.

I am trying to create a REST connector that would do a GET request on a URL.
During the creation, when I click on "Test", I get the following error :
java.lang.reflect.InvocationTargetException
org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: USERNAME=install |
org.bonitasoft.engine.core.connector.exception.SConnectorException:
org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException:
org.bonitasoft.engine.connector.exception.SConnectorException:
org.bonitasoft.engine.connector.ConnectorException: 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

The problem is that the URL I am calling is in HTTPS and uses a self-signed certificate.
To solve that, I have to provide my own JKS keystore to Bonita.

I tried to modify the following line in the file D:\BonitaBPMCommunity-7.5.1-64\workspace\tomcat\server\bin\setenv.bat :
set CATALINA_OPTS=%CATALINA_OPTS% %PLATFORM_SETUP% %H2_DATABASE_DIR% %DB_OPTS% %BDM_DB_OPTS% %BTM_OPTS% %INCIDENT_LOG_DIR% -Dfile.encoding=UTF-8 -Xshare:auto -Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.trustStore=D:/intellij/GE.truststore
But that is not working.

Could you please explain how we can change the KeyStore used by Bonita?

1
0
-1

See:

221 ticks: http://stackoverflow.com/questions/9619030/resolving-javax-net-ssl-sslha...

and here:
https://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-un...

regards
Seán

PS: As this reply offers an answer your question, and if you like it, please Mark UP and/or as Resolved.

Comments

Submitted by anandages841 on Wed, 04/05/2017 - 12:10

Hi Sean,

I have imported the necessary certificates.
Is there any Bonita trusted Ca containers in the server ( tomcat instance where have deployed our Bonita portal) where i need to add them?
I am a bit confused why i get this error.

Regards
A.

Notifications