I call an external API from my JAVA app, the API is from another app (Let’s call it App2), App2 is deployed on Test environment, the API hit error [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] when I run my app locally as well as when I deployed to Test environment. However, the API works when I deployed to Sit environment, so I was suspecting something wrong with Test environment but I have no idea what is the issue.
I tried to deploy the same code to both Test and Sit environment and only Sit environment can works, meaning the issue comes from Test environment. Anyone hit this issue before? Appreciate if could you could assist, thank you in advance.