You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2024/11/05 12:38:00 UTC

[jira] [Commented] (CXF-9079) java.lang.IllegalStateException: Encoding process already completed from LengthDelimitedEncoder

    [ https://issues.apache.org/jira/browse/CXF-9079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17895582#comment-17895582 ] 

Andriy Redko commented on CXF-9079:
-----------------------------------

It has been fixed by [https://github.com/apache/cxf/commit/8764966250c3ef1910c00fe3adbca483684f0455|https://github.com/apache/cxf/commit/8764966250c3ef1910c00fe3adbca483684f0455,] as part of CXF-8629

> java.lang.IllegalStateException: Encoding process already completed from LengthDelimitedEncoder
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-9079
>                 URL: https://issues.apache.org/jira/browse/CXF-9079
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 4.0.5
>            Reporter: Luke Xu
>            Priority: Major
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)