Jonathan Jarvis created OLINGO-1468: ---------------------------------------
Summary: Batch Requests Block Indefinitely on Batch Request payloadManager() access when chunking disabled Key: OLINGO-1468 URL: https://issues.apache.org/jira/browse/OLINGO-1468 Project: Olingo Issue Type: Bug Components: odata4-client Affects Versions: (Java) V4 4.7.1 Reporter: Jonathan Jarvis When using the OData v4 Client to perform requests against a Microsoft Dynamics Instance (which does not support chunked transfer encoding), attempting to create a BatchManager causes a block that waits the thread indefinitely on a PipedInputStream. {code:java} ODataClient client = ... client.getOdataClient().getConfiguration().setUseChuncked( false ); ODataBatchRequest br = client.getBatchRequestFactory().getBatchRequest( <baseUrl> ); //Thread waits indefinitely here, and the BatchManager is required to addRequest to the Batch BatchManager bm = br.payloadManager(); {code} The code locks on this IOUtils call because the *input* argument is a *PipedInputStream*: https://github.com/apache/olingo-odata4/blob/4.7.1-RC01/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java#L289 called from by: https://github.com/apache/olingo-odata4/blob/4.7.1-RC01/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java#L117 I believe the problem could be fixed if chunking disabled would cause the _URIUtils.shouldUseRepeatableHttpBodyEntry_ function to return *true*, thus the IOUtils.copy would not be executed until the Future of AbstractODataStreamedRequest is satisfied. https://github.com/apache/olingo-odata4/blob/4.7.1-RC01/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java#L267 -- This message was sent by Atlassian Jira (v8.3.4#803005)