You think it might be a bug?

"And why does the Z file rollback?"

That is the question :)



Claus Ibsen-2 wrote:
> 
> Hi
> 
> Can you create a JIRA ticket and if possible attach a small test /
> unit test about this.
> 
> And why does the Z file rollback?
> 
> 
> On Fri, Jun 4, 2010 at 1:22 PM, ankelee <andreasasm...@gmail.com> wrote:
>>
>> I'm trying to use the aggregator like so:
>>
>> <route id="BundlingRoute" autoStartup="true">
>>        <from
>> uri="file:{{directory.outgoing}}?include=\A{{edifact.messagePrefix}}.*"
>> />
>>        <to uri="xslt:file:{{schema.edifactToIntermediate}}" />
>>        <setHeader headerName="virNo">
>>                <xpath>
>>                        /edi/transaction[1]/@VirNo
>>                </xpath>
>>        </setHeader>
>>        <unmarshal ref="jaxbIntermediate" />
>>        <aggregate strategyRef="EdifactAggregator"
>> completionFromBatchConsumer="true">
>>                <correlationExpression>
>>                        <header>virNo</header>
>>                </correlationExpression>
>>                <marshal ref="jaxbIntermediate" />
>>                <to uri="xslt:file:{{schema.intermediateToEdifact}}" />
>>                <to uri="file:data/out/outbox/vans_sim" />
>>        </aggregate>
>> </route>
>>
>> This works fine, aggregation etc. works, until I reach the last file of
>> the
>> directory I get an exception:
>> This causes a loop where the file rolls back and camel reads it and rolls
>> back etc.
>>
>> This only happens if the last file in the directory is not in a series
>> that
>> will be aggregated.
>> so if I have:
>>
>> fileA1
>> fileA2
>> fileB1
>> fileC1
>> fileC2
>>
>> This works as intended. I get 3 aggregated files on the other end:
>> fileA1,
>> fileB1, fileC1.
>> But if I do:
>>
>> fileA1
>> fileA2
>> fileC1
>> fileC2
>> fileZ1
>>
>> This fails and I get fileA1, fileC1 outputted. FileZ1 is getting rolled
>> back
>> and throws the below exception:
>>
>> [t/outbox?include=%5CAOPSIGE_.*] GenericFileOnCompletion        WARN
>> Rollback file strategy:
>> org.apache.camel.component.file.strategy.genericfilerenameprocessstrat...@4c7e10
>> for file: GenericFile[OPSIGE_single3.edi]
>> [t/outbox?include=%5CAOPSIGE_.*] DefaultErrorHandler            ERROR
>> Failed
>> delivery for exchangeId: c09eebfc-7d5e-49dc-82e1-dd4ffb1f5de3. Exhausted
>> after delivery attempt: 1 caught: java.lang.NullPointerException
>> java.lang.NullPointerException
>>        at
>> org.apache.camel.processor.aggregate.AggregateProcessor.doAggregation(AggregateProcessor.java:249)
>>        at
>> org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:182)
>>        at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
>>        at
>> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
>>        at
>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:97)
>>        at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:185)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:151)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:89)
>>        at
>> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
>>        at
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
>>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:75)
>>        at
>> org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:70)
>>        at
>> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
>>        at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:269)
>>        at
>> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:137)
>>        at
>> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
>>        at
>> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:98)
>>        at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>>        at
>> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>>        at
>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>>        at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>>        at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>>        at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>>        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:619)
>> [t/outbox?include=%5CAOPSIGE_.*] GenericFileOnCompletion        ERROR
>> Caused
>> by: [java.lang.NullPointerException - null]
>> java.lang.NullPointerException
>>        at
>> org.apache.camel.processor.aggregate.AggregateProcessor.doAggregation(AggregateProcessor.java:249)
>>        at
>> org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:182)
>>        at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
>>        at
>> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
>>        at
>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:97)
>>        at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:185)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:151)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:89)
>>        at
>> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
>>        at
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
>>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:75)
>>        at
>> org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:70)
>>        at
>> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
>>        at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:269)
>>        at
>> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:137)
>>        at
>> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
>>        at
>> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:98)
>>        at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>>        at
>> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>>        at
>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>>        at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>>        at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>>        at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>>        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:619)
>>
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Aggregator-problem-with-files-%28Camel-2.3%29-tp28778641p28778641.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Aggregator-problem-with-files-%28Camel-2.3%29-tp28778641p28778973.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to