You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
When invoking the createJob() i am receiving the following:
...
23:03:59.161 [main] INFO endolabs.salesforce.bulkv2.Bulk2ClientBuilder - <-- END HTTP (512-byte body)
java.io.UncheckedIOException: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'okhttp3': was expecting ('true', 'false' or 'null')
at [Source: (String)"okhttp3.internal.http.RealResponseBody@42a48628"; line: 1, column: 8]
Looks like it might be an okhttp3 issue, as when the interceptor is enabled its printing the body, and i can see it.
From the documentation the body is only read once, as its a buffered stream, so my initial thought it was the interceptor closing the stream before the code gets a handle on the body.
Removing the http body interceptor still yields the same result.
Updated: Issue resolved, by using responseBody.string() over responseBody.toString(), followed by closing the responseBody.close() - will also need to handle an IOExcecption.
Also Salesforce has the concept of a closed job, added to JobStateEnum.
The text was updated successfully, but these errors were encountered:
Created a pull request for the responseBody changes. Ran into this issue and fixed the issue in the PR. I did not add the Closed job state to the JobStateEnum though.
Hello,
When invoking the createJob() i am receiving the following:
...
23:03:59.161 [main] INFO endolabs.salesforce.bulkv2.Bulk2ClientBuilder - <-- END HTTP (512-byte body)
java.io.UncheckedIOException: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'okhttp3': was expecting ('true', 'false' or 'null')
at [Source: (String)"okhttp3.internal.http.RealResponseBody@42a48628"; line: 1, column: 8]
Looks like it might be an okhttp3 issue, as when the interceptor is enabled its printing the body, and i can see it.
From the documentation the body is only read once, as its a buffered stream, so my initial thought it was the interceptor closing the stream before the code gets a handle on the body.
Removing the http body interceptor still yields the same result.
Updated: Issue resolved, by using responseBody.string() over responseBody.toString(), followed by closing the responseBody.close() - will also need to handle an IOExcecption.
Also Salesforce has the concept of a closed job, added to JobStateEnum.
The text was updated successfully, but these errors were encountered: