Andrei Shakirin created CXF-4480:
------------------------------------

             Summary: Client generated with "-db source" and using streaming 
doesn't work properly with messages > 10 kb
                 Key: CXF-4480
                 URL: https://issues.apache.org/jira/browse/CXF-4480
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.6
            Reporter: Andrei Shakirin
            Priority: Critical


Use case: client is generated from WSDL using -db source option and uses 
streaming to send message payload concurrently. Service is implemented using 
Provider<> interface and just redirects incoming request to response.

Test results:

1. Combination works fine if message size is 1 KB. Client succesfully runs in 
single thread and in concurrent modes.

2. If message size is 10 KB (or larger), after some time client becomes 
following exceptions:

WARNING: Interceptor for 
{http://www.talend.org/benchmark}BenchmarkService#{http://www.talend.org/benchmark}requestResponse
 has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not generate the XML stream caused by: 
com.ctc.wstx.exc.WstxIOException: Error writing request body to server.
        at 
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:73)
        at 
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:50)
        at 
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:46)
        at 
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:119)
        at 
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:532)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:89)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
        at $Proxy21.requestResponse(Unknown Source)
        at 
org.talend.ps.benchmark.consumer.RunnableTest.run(RunnableTest.java:30)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxIOException: Error writing request body to 
server
        at 
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:464)
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:551)
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:527)
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:481)
        at 
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:70)
        ... 16 more

Errors occure in concurrent as well as in non-concurrent modes, but are easily 
reproducable in concurrent case.

Eventually problem is related to message chunking.

Test projects are attached.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to