oracle/oci-java-sdk

IntegrationInstanceClient.listIntegrationInstances() throwing exception

gabrielspaulino opened this issue · 0 comments

I am having a problem when trying to call com.oracle.bmc.integration.IntegrationInstanceClient.listIntegrationInstances() method from OCI REST API for Java.

When trying to call this method to list the existing integration instances it returns a NullPointerException with the message: com.oracle.bmc.http.signing.internal.SignedRequestException: java.lang.NullPointerException: Exception while communicating to [https://integration.ocid1.tenancy.oc1..xyz/20190131/integrationInstances?compartmentId=sa-saopaulo-1.](https://integration.ocid1.tenancy.oc1..aaaaaaaacvhmdyzad2s3q3tjfemoxl2jgzapib2u7eito2d4hyudxhh7uqiq/20190131/integrationInstances?compartmentId=sa-saopaulo-1.) Expecting exactly one value for header host

While debugging I compared with other method calls that were working and noticed that in the failed request the baseTarget passed as argument has a targetUri like this: https://integration.ocid1.tenancy.oc1..{...} and then the request header "host" ends up with a null value
While other requests that don't throw any exception receive a targetUri in this pattern: https://{serviceName}.sa-saopaulo-1.oci.oraclecloud.com/
I thought this might be the reason of the issue, could anyone help?