Problem with Okta certificate "unable to find valid certification path to requested target"

Hi,
I’m a new Okta user. I have came across with a problem in my Java application. My application was supposed to make some GET/PUT/DELETE calls to Okta (namely with Okta endpoints /api/v1/users and /api/v1/groups). When I deployed my application and tried executing these calls I’m getting this error message:
Message: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 1022 .
As far as I am understanding this, the error refers to the fact that I don’t have appropriate certificate included for my application. Am I understanding this right? Could someone tell me how should I generate such certificate? Also could someone tell me how could I pass this certificate to ma application? My application is based on Java with Gradle using Docker