camel-cxf - CxfClientCallback is invoked twice when only one was expected
-------------------------------------------------------------------------

                 Key: CAMEL-2994
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2994
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.5.0
            Reporter: Claus Ibsen
             Fix For: 2.5.0


Run the test CXFWsdlOnlyTest

Because CXF invokes the CxfClientCallback 2 times there is a race condition 
with 2 threads wanting to complete routing the Exchange.

You can then end up with errors such as
{code}
>>>>>>>>>
2010-07-26 13:22:13,305 [default-workqueue-1                ] INFO  Logger      
                   - Exchange[Message: [Body is instance of 
java.io.InputStream]]
Exception in thread "default-workqueue-1" java.util.NoSuchElementException
        at java.util.AbstractList$Itr.next(AbstractList.java:350)
        at org.apache.camel.processor.Pipeline$1.done(Pipeline.java:153)
        at 
org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:262)
        at 
org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorHandler.java:302)
        at 
org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:78)
        at 
org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:78)
        at 
org.apache.camel.component.cxf.CxfClientCallback.handleException(CxfClientCallback.java:77)
        at 
org.apache.cxf.interceptor.ClientOutFaultObserver.onMessage(ClientOutFaultObserver.java:55)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:2144)
        at 
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:253)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:637)
2010-07-26 13:22:13,305 [default-workqueue-2                ] INFO  Logger      
                   - Exchange[Message: [Body is instance of 
java.io.InputStream]]
Exception in thread "default-workqueue-2" java.util.NoSuchElementException
        at java.util.AbstractList$Itr.next(AbstractList.java:350)
        at org.apache.camel.processor.Pipeline$1.done(Pipeline.java:153)
        at 
org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:262)
        at 
org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorHandler.java:302)
        at 
org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:78)
        at 
org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:78)
        at 
org.apache.camel.component.cxf.CxfClientCallback.handleException(CxfClientCallback.java:77)
        at 
org.apache.cxf.interceptor.ClientOutFaultObserver.onMessage(ClientOutFaultObserver.java:55)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:2144)
        at 
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:253)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:637)
{code}

CXF should only invoke the {{org.apache.cxf.endpoint.ClientCallback}} one time 
as we have only registered this once.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to