Hello.

When running the attached unit test, I get the following (shortened)
stack trace, and the test fails with an error (not a failure). Using a
regular (non-streaming) splitter is enough to make the test pass.

Is this normal behaviour ?
Is the streaming splitter redundant, in the case of a "streaming" body
(like in the test, an iterator) ? The documentation
(http://camel.apache.org/splitter.html) would suggest otherwise.

org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message:
camel.test.SplitExceptionHandlingTest$1@1041876]
       at 
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1212)
       at 
org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:509)
       at 
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:442)
       at 
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:438)
       at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:126)
       at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:342)
       at 
camel.test.SplitExceptionHandlingTest.testDuplicateIdFailure(SplitExceptionHandlingTest.java:47)
       ...
Caused by: java.lang.RuntimeException: Uhoh.
       at 
camel.test.SplitExceptionHandlingTest$1.next(SplitExceptionHandlingTest.java:56)
       at 
camel.test.SplitExceptionHandlingTest$1.next(SplitExceptionHandlingTest.java:1)
       at org.apache.camel.processor.Splitter$1$1.next(Splitter.java:158)
       at 
org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:504)
       at 
org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:219)
       at org.apache.camel.processor.Splitter.process(Splitter.java:97)
       at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:122)
       at 
org.apache.camel.processor.SubUnitOfWorkProcessor.process(SubUnitOfWorkProcessor.java:59)
       at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
       at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
       at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
       at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
       ...

Cheers!
Răzvan Ludvig

Reply via email to