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

Async operations fail in concurrent calls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.8, 3.6.3, 4.0.4
    • 3.5.9, 4.1.0, 4.0.5, 3.6.4
    • JAX-WS Runtime
    • None
    • Unknown

    Description

      An exception occurs when a SOAP client is used concurrently in async operations, the exception is as follows:

       

       

      org.apache.cxf.interceptor.Fault: Could not send Message.
        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:67) ~[cxf-core-4.0.4.jar:4.0.4]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[cxf-core-4.0.4.jar:4.0.4]
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) ~[cxf-core-4.0.4.jar:4.0.4]
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:434) ~[cxf-core-4.0.4.jar:4.0.4]
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:412) ~[cxf-core-4.0.4.jar:4.0.4]
        at org.apache.cxf.jaxws.JaxWsClientProxy.invokeAsync(JaxWsClientProxy.java:326) ~[cxf-rt-frontend-jaxws-4.0.4.jar:4.0.4]
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:138) ~[cxf-rt-frontend-jaxws-4.0.4.jar:4.0.4]
        at jdk.proxy2/jdk.proxy2.$Proxy95.countAsync(Unknown Source) ~[na:na]
        at com.example.demo.rest.RestController.lambda$async$1(RestController.java:25) ~[classes/:na]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
      Caused by: io.netty.channel.StacklessClosedChannelException: null
        at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(ChannelPromise)(Unknown Source) ~[netty-transport-4.1.109.Final.jar:4.1.109.Final]

       

      I created an reproducer application (find attached "spring-soap.zip")  that acts as client and server, and this publishes the following operations:

      • http://localhost:8080/async -> it uses a soap client to call concurrently using an async operation (this fails with the exception previously described)
      • http://localhost:8080/sync -> it uses a soap client to call concurrently using an ordinary operation (ends without errors)

      Attachments

        1. spring-soap.zip
          105 kB
          Julio J. Gomez Diaz

        Issue Links

          Activity

            People

              reta Andriy Redko
              juliojgd Julio J. Gomez Diaz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: