We wrote a Java Client program to call the REST APIs of OpenText for Uploading the Files to Content Server.
The Program is working on Windows 10 / JDK 1.8 platform.
But when the code is migrated to Linux / JDK 17 platform, we are not able to get the OTCS Ticket.
'response' object is coming as null in the below code in Linuz / JDK17, but is working from Windows 10/JDK1.8.
Are you aware of any changes done in JDK17 that makes it not work ?
Can you please check and help ?
Following is the Code
Client client = ClientBuilder.newClient(); // this line does not complete on Linux
Response response = null;
Form form = new Form();
form.param("username", getIKNOW_USERNAME());
form.param("password", getIKNOW_PASSWORD());
Entity<Form> entity = Entity.form(form);
try
{
response = client.target(getIKNOW_BASE_URL() + "/api/v1/auth")
.request(MediaType.APPLICATION_JSON_TYPE)
.post(entity);
// response is returning as NULL.
} catch (Exception e) {
System.out.println("Exception while calling Auth REST API .. " + e.getMessage());
System.out.println("Localized Error Message : " + e.getLocalizedMessage());
e.printStackTrace();
}