Я пытаюсь подключить службу Rest из моего приложения. И мое приложение развернуто на сервере WAS.
Я использую Spring RestTemplate для обслуживания остальных пользователей, и все работает нормально в моей локальной настройке WAS.
Но когда я развертываю свой код в среде QA (нижняя область среды), в моем файле журнала появляется ошибка ниже.
[4/30/18 17:18:22:355 EDT] 00000207 SystemErr R org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://host:port/resourcename": com.ibm.jsse2.util.j: PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is:
java.security.cert.CertPathValidatorException: The certificate issued by CN=XXX Root CA, O="The XXX Services Group, Inc." is not trusted; internal cause is:
java.security.cert.CertPathValidatorException: Certificate chaining error; nested exception is javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is:
java.security.cert.CertPathValidatorException: The certificate issued by CN=XXX Root CA, O="The XXX Services Group, Inc." is not trusted; internal cause is:
java.security.cert.CertPathValidatorException: Certificate chaining error
[4/30/18 17:18:22:355 EDT] 00000207 SystemErr R at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:607)
[4/30/18 17:18:22:356 EDT] 00000207 SystemErr R at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:557)
[4/30/18 17:18:22:357 EDT] 00000207 SystemErr R at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:357)
Я импортировал сертификаты для порта и хоста с помощью опции сертификата подписавшего, но проблема все еще не решена (также попытался импортировать корневые сертификаты). Кто-нибудь может дать мне знать, в чем может быть проблема?