I am developing SAP Extension Application using java 1.8, Spring Boot and SAP SDK. I am deploying this application in SAP BTP (SAP Cloud platform). My S4HANA instance is trial version and it is running in CAL.
My Spring Boot application could talk to S4HANA instance from my local after doing below steps.
- provided entries in /etc/hosts
- exported certificate by using open-ssl command
- Added the exported certificate to Java CACerts
- Used Domain Name in application as destination
I have deployed same application to SAP BTP and configured the destination from Sub Domain -> Space -> Instances -> Destinations
Here I could give only IP address only as the domain name is not recognised and provided the certificate which I was using in my local. But it is not working, the application is failing with below error.
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT Caused by: java.security.KeyStoreException: CERTIFICATE not found
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT at java.security.KeyStore.getInstance(KeyStore.java:851) ~[na:1.8.0_281]
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestination.getKeyStore(ScpCfDestination.java:257) ~[connectivity-scp-cf-2.1.2.jar:na]
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT ... 63 common frames omitted
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT Caused by: java.security.NoSuchAlgorithmException: CERTIFICATE KeyStore not available
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT at sun.security.jca.GetInstance.getInstance(GetInstance.java:159) ~[na:1.8.0_281]
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT at java.security.Security.getImpl(Security.java:697) ~[na:1.8.0_281]
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT at java.security.KeyStore.getInstance(KeyStore.java:848) ~[na:1.8.0_281]
2021-04-05T22:04:24.42+0530 [APP/PROC/WEB/0] OUT ... 64 common frames omitted
Looks like the issue withe providing certificate. Please help me by providing inputs to solve this issue.