After upgrading to v8-R2025-01/02, a Talend Job containing both tRest and tRestClient components encounters an error as shown below:
- javax.ws.rs.client cannot be resolved to a type - The type javax.ws.rs.client.ClientBuilder cannot be resolved. It is indirectly referenced from required type org.glassfish.jersey.client.JerseyClientBuilder - javax.ws.rs.client.WebTarget cannot be resolved to a type - javax.ws.rs.core.Response cannot be resolved to a type - javax.ws.rs.client.Invocation cannot be resolved to a type - javax.ws.rs.WebApplicationException cannot be resolved to a type
Cause
When tRest and tRestClient components are used together within a Job, a conflict arises in the implementation of the Rest API.
Resolution
To resolve this issue, a temporary workaround as shown below is to use tLibraryLoad to load external jar files in the beginning of Job: tPrejob --onComponentOK-> tLibrary (javax.ws.rs-api-2.1.jar) --onComponentOK-> tLibrary (javax.annotation-api-1.3.2.jar)
Note: If the aforementioned workaround proves effective, kindly remember to remove the tLibraryLoad components after installing the Studio v8-R2025-03 patch.
Alternatively, apply the Studio v8-R2025-03 patch.