Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-9079

java.lang.IllegalStateException: Encoding process already completed from LengthDelimitedEncoder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.5
    • 4.1.0, 3.5.10, 3.6.5, 4.0.6
    • Transports
    • None
    • Unknown

    Description

      We are sending some binary content out with JAX-RS WebClient. The HTTP transport is http.asyncclient.hc5. Somehow, when I disable allow-chunking in conduit configuration, CXF has org/apache/hc/core5/http/impl/nio/LengthDelimitedEncoder.java involved in the transaction. The transaction fails due to an assertion in the class at assertNotCompleted() at around line#112. It looks like write() in this class is called again after its state is set to complete.

      I'm quite sure in my request the content-length of the request is correctly calculated and if I override the class and remove the assertion. My use case works fine. 

      The issue also won't happen with any text payload. Is it related to CXF-8629? Please help check.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lukexu_infor Luke Xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: