java.io.IOException: Queue closed at java.net.http.Queue.take(java.httpclient@9-internal/Queue.java:113) at java.net.http.Stream.lambda$receiveData$1(java.httpclient@9-internal/Stream.java:187) at java.net.http.Stream.executeInline(java.httpclient@9-internal/Stream.java:164) at java.net.http.Stream.receiveData(java.httpclient@9-internal/Stream.java:182) at java.net.http.Stream.readBodyAsync(java.httpclient@9-internal/Stream.java:142) at java.net.http.Stream.readBody(java.httpclient@9-internal/Stream.java:155) at java.net.http.Exchange.readBody(java.httpclient@9-internal/Exchange.java:131) at java.net.http.MultiExchange.response(java.httpclient@9-internal/MultiExchange.java:121) at java.net.http.HttpRequestImpl.response(java.httpclient@9-internal/HttpRequestImpl.java:251)

JDK Bug System | John Jiang | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    public class SimpleConnectTest { public static void main(String[] args) throws Exception { String url = "..."; // This access won't return body HttpClient client = HttpClient.create().version(Version.HTTP_2).build(); HttpRequest request = client.request(new URI(url)).GET(); HttpResponse<String> response = request.response(HttpResponse.BodyHandler.asString()); System.out.println(response.statusCode()); System.out.println(response.body()); } } Exception in thread "main" java.io.IOException: Queue closed at java.net.http.Queue.take(java.httpclient@9-internal/Queue.java:113) at java.net.http.Stream.lambda$receiveData$1(java.httpclient@9-internal/Stream.java:187) at java.net.http.Stream.executeInline(java.httpclient@9-internal/Stream.java:164) at java.net.http.Stream.receiveData(java.httpclient@9-internal/Stream.java:182) at java.net.http.Stream.readBodyAsync(java.httpclient@9-internal/Stream.java:142) at java.net.http.Stream.readBody(java.httpclient@9-internal/Stream.java:155) at java.net.http.Exchange.readBody(java.httpclient@9-internal/Exchange.java:131) at java.net.http.MultiExchange.response(java.httpclient@9-internal/MultiExchange.java:121) at java.net.http.HttpRequestImpl.response(java.httpclient@9-internal/HttpRequestImpl.java:251) at SimpleConnectTest.main(SimpleConnectTest.java:13)

    JDK Bug System | 6 months ago | John Jiang
    java.io.IOException: Queue closed at java.net.http.Queue.take(java.httpclient@9-internal/Queue.java:113) at java.net.http.Stream.lambda$receiveData$1(java.httpclient@9-internal/Stream.java:187) at java.net.http.Stream.executeInline(java.httpclient@9-internal/Stream.java:164) at java.net.http.Stream.receiveData(java.httpclient@9-internal/Stream.java:182) at java.net.http.Stream.readBodyAsync(java.httpclient@9-internal/Stream.java:142) at java.net.http.Stream.readBody(java.httpclient@9-internal/Stream.java:155) at java.net.http.Exchange.readBody(java.httpclient@9-internal/Exchange.java:131) at java.net.http.MultiExchange.response(java.httpclient@9-internal/MultiExchange.java:121) at java.net.http.HttpRequestImpl.response(java.httpclient@9-internal/HttpRequestImpl.java:251)

    Root Cause Analysis

    1. java.io.IOException

      Queue closed at java.net.http.Queue.take(java.httpclient@9-internal/Queue.java:113) at java.net.http.Stream.lambda$receiveData$1(java.httpclient@9-internal/Stream.java:187) at java.net.http.Stream.executeInline(java.httpclient@9-internal/Stream.java:164) at java.net.http.Stream.receiveData(java.httpclient@9-internal/Stream.java:182) at java.net.http.Stream.readBodyAsync(java.httpclient@9-internal/Stream.java:142) at java.net.http.Stream.readBody(java.httpclient@9-internal/Stream.java:155) at java.net.http.Exchange.readBody(java.httpclient@9-internal/Exchange.java:131) at java.net.http.MultiExchange.response(java.httpclient@9-internal/MultiExchange.java:121) at java.net.http.HttpRequestImpl.response(java.httpclient@9-internal/HttpRequestImpl.java:251)

      at SimpleConnectTest.main()
    2. Unknown
      SimpleConnectTest.main
      1. SimpleConnectTest.main(SimpleConnectTest.java:13)
      1 frame