A Talend Job includes a tRest component that attempts to post 100kb of JSON/XML data to an API, but fails with the following error:
tREST component fails with the error "400 , { "failures": [ { "field": "name", "constraint": "Must be a string value, at least 1 character and at most 100 characters long." }, { "field": "fields", "constraint": "Is required." } ] }"
Cause
When a Job includes both tRest and tRestClient components, tRest will use CXF implement auto to make HTTP requests. This will cause some random issues, as the CXF framework forces the use of the transfer-encoding header when the body size exceeds 4096. This will result in the post data being chunked (Transfer-Encoding: chunked), and then the server side cannot interpret the data fully as a whole. This was a previously identified defect.
Resolution
To resolve this issue, a temporary workaround is to select the "Disable chunked encoding" checkbox on tRestClient.
Alternatively, apply the Studio v8-R2025-03 patch.