Skip to main content

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

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.Alert.createSSLException(Alert.java:131)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:370)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:313)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
        at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:652)
        at sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:471)
        at sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:367)
        at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:376)
        at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:479)
        at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:990)
        at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:977)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:924)
        at weblogic.socket.JSSEFilterImpl.doTasks(JSSEFilterImpl.java:223)
        at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:123)
        at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:87)
        at weblogic.socket.JSSESocket.startHandshake(JSSESocket.java:250)
        at weblogic.net.http.HttpsClient.New(HttpsClient.java:577)
        at weblogic.net.http.HttpsClient.New(HttpsClient.java:557)
        at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:265)
        at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:754)
        at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:42)
        at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1616)
        at java.net.HttpURLConnection.getResponseMessage(HttpURLConnection.java:546)
        at com.kp.connector.workday.WorkdayTrustedConnectorReconOp.getAccessToken(WorkdayTrustedConnectorReconOp.java:723)
        at com.kp.connector.workday.WorkdayTrustedConnectorReconOp.getWorkdayUsersDeatils(WorkdayTrustedConnectorReconOp.java:586)
        at com.kp.connector.workday.WorkdayTrustedConnector.executeQuery(WorkdayTrustedConnector.java:61)
        at com.kp.connector.workday.WorkdayTrustedConnector.executeQuery(WorkdayTrustedConnector.java:32)
        at org.identityconnectors.framework.impl.api.local.operations.SearchImpl.rawSearch(SearchImpl.java:105)
        at org.identityconnectors.framework.impl.api.local.operations.SearchImpl.search(SearchImpl.java:82)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:93)
        at com.sun.proxy.$Proxy592.search(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:107)
        at com.sun.proxy.$Proxy592.search(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.identityconnectors.framework.impl.api.BufferedResultsProxy$BufferedResultsHandler.run(BufferedResultsProxy.java:162)
Caused by: 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.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
        at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
        at sun.security.validator.Validator.validate(Validator.java:271)
        at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:312)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:232)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:109)
        at weblogic.security.SSL.jsseadapter.JaTrustManager.checkServerTrusted(JaTrustManager.java:128)
        at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:1269)
        at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:630)
        ... 42 more
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:434)
        ... 50 more
this.AUTH Token is --> null
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.Alert.createSSLException(Alert.java:131)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:370)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:313)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
        at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:652)
        at sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:471)
        at sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:367)
        at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:376)
        at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:479)
        at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:990)
        at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:977)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:924)
        at weblogic.socket.JSSEFilterImpl.doTasks(JSSEFilterImpl.java:223)
        at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:123)
        at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:87)
        at weblogic.socket.JSSESocket.startHandshake(JSSESocket.java:250)
        at weblogic.net.http.HttpsClient.New(HttpsClient.java:577)
        at weblogic.net.http.HttpsClient.New(HttpsClient.java:557)
        at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:265)
        at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:754)
        at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:42)
        at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1616)
        at com.kp.connector.workday.WorkdayTrustedConnectorReconOp.getWorkdayUsersDeatils(WorkdayTrustedConnectorReconOp.java:599)
        at com.kp.connector.workday.WorkdayTrustedConnector.executeQuery(WorkdayTrustedConnector.java:61)
        at com.kp.connector.workday.WorkdayTrustedConnector.executeQuery(WorkdayTrustedConnector.java:32)
        at org.identityconnectors.framework.impl.api.local.operations.SearchImpl.rawSearch(SearchImpl.java:105)
        at org.identityconnectors.framework.impl.api.local.operations.SearchImpl.search(SearchImpl.java:82)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:93)
        at com.sun.proxy.$Proxy592.search(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:107)
        at com.sun.proxy.$Proxy592.search(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.identityconnectors.framework.impl.api.BufferedResultsProxy$BufferedResultsHandler.run(BufferedResultsProxy.java:162)
Caused by: 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.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
        at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
        at sun.security.validator.Validator.validate(Validator.java:271)
        at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:312)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:232)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:109)
        at weblogic.security.SSL.jsseadapter.JaTrustManager.checkServerTrusted(JaTrustManager.java:128)
        at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:1269)
        at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:630)
        ... 40 more
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:434)
        ... 48 more


**Issue-When you are trying to run reconciliation operation using scheduler, you may face this issue. To resolve this issue, following solution can be applied.

**Solution-

1. Go to WebLogic console>servers>oim_server1 and oim_server2(in case of cluster) and click KeyStores.

2. Copy the OIM Trust KeyStore path. Import your certificate in that path.
Also import your certificate in JDK path which oim_server1 is using. In case of cluster, perform steps on all nodes.
Below are the commands to import the certificate. Restart all servers including admin after import.

keytool -import -keystore /opt/oracle/apps/jdk/jre/lib/security/cacerts -file /home/oracleapp/cert/wdsandbox.cer -storepass changeit -alias wdsandbox

keytool -import -keystore /opt/oracle/apps/OIM_Middleware/wlserver/server/lib/oimtruststore.jks -file /home/oracleapp/cert/wdsandbox.cer -alias wdsandbox 

To check if certificate imported properly, please execute following commands.

keytool -list -keystore "/home/oracleapp/cert/oimtruststore.jks" 
keytool -list -keystore "/opt/oracle/apps/jdk/jre/lib/security/cacerts" -storepass changeit


Thanks and Regards,
Team Identity Tiffin




Comments

Popular Posts

How to Import Certificate in OIM Keystore

How to Import Certificate in OIM  KeyStore Commands to import certificate into OIM keystore are as below. If you have custom keystore, you can import certificate in custom keystore or if you do not have custom keystore, you can import in DemoTrust.jks keystore. 1.Import Certificate- keytool -import -keystore /opt/oracle/apps/jdk/jre/lib/security/cacerts -file /home/oracleapp/cert/wdsandbox.cer -storepass changeit -alias wdsandbox keytool -import -keystore /opt/oracle/apps/OIM_Middleware/wlserver/server/lib/oimtruststore.jks -file /home/oracleapp/cert/wdsandbox.cer -alias wdsandbox -storepass 0imtrustst0repassw0rd keytool -import -keystore /opt/oracle/apps/OIM_Middleware/wlserver/server/lib/oimkeystore.jks -file /home/oracleapp/cert/wdsandbox.cer -alias wdsandbox -storepass 0imkeyst0repassw0rd keytool -import -keystore /opt/oracle/apps/OIM_Middleware/wlserver/server/lib/DemoTrust.jks -file /home/oracleapp/cert/wdsandbox.cer -storepass DemoTrustKeyStorePassPhrase -alias wdsandbo...

How to UploadJars.sh ICFBundle Jar in Oracle Identity Manager

How to UploadJars.sh ICFBundle Jar in Oracle Identity Manager Introduction-Suppose you have developed ICFBundle connector code, now you want to deploy connector code in OIM as ICFBundle Jar, following are the steps to deploy. Navigate to the following location and run below script. [oracleapp@elcosapoim3:/opt/oracle/apps/OIM_Middleware/idm/server/bin]$ ./UploadJars.sh  For running the Utilities the following environment variables need to be set  APP_SERVER is weblogic  OIM_ORACLE_HOME is /opt/oracle/apps/OIM_Middleware/idm  JAVA_HOME is /opt/oracle/apps/jdk1.8.0_271  MW_HOME is /opt/oracle/apps/OIM_Middleware  WL_HOME is /opt/oracle/apps/OIM_Middleware/wlserver  DOMAIN_HOME is /opt/oracle/apps/OIM_Middleware/user_projects/domains/OIG_domain  For running the Utilities the following environment variables need to be set  APP_SERVER is weblogic  OIM_ORACLE_HOME is /opt/oracle/apps/OIM_Middleware/idm  JAVA_HOME is /opt/oracle/apps/jdk1.8...