You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2009/07/09 13:11:12 UTC
Is message of RollbackProcessor class mandatory - camel 2.0 ?
Hi,
The following camel route
<camel:route>
<camel:from ref="directRequestEndpoint"/>
<camel:transacted ref="PROPAGATION_REQUIRED"/>
<camel:doTry>
<!-- Call the requestService to save the request -->
<camel:bean ref="serviceHelper" method="createRequest"/>
<camel:bean ref="serviceHelper" method="generateError"
/>
<camel:to ref="queueRequestEndpoint" />
<camel:doCatch>
<camel:exception>com.xpectis.x3s.exception.X3SException</camel:exception>
* <camel:rollback/>*
<camel:bean ref="serviceHelper"
method="processException"/>
<camel:to ref="queueReportingEndpoint" />
</camel:doCatch>
</camel:doTry>
</camel:route>
generates an error at the line 42 of RollbackProcessor class :
org.apache.camel.spring.spi.TransactedRuntimeCamelException:
org.apache.camel.RollbackExchangeException: null on the exchange:
Exchange[Message: com.xpectis.x3s.platform.model.Request@8aa95f]
at
org.apache.camel.spring.spi.TransactionErrorHandler.wrapTransactedRuntimeException(TransactionErrorHandler.java:170)
at
org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:121)
Is the parameter message of RollbackProcessor mandatory now ?
Regards,
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
Re: Is message of RollbackProcessor class mandatory - camel 2.0 ?
Posted by Charles Moulliard <cm...@gmail.com>.
I will try but this is not blocking. In the meantime, I have added a message
as parameter
*Nevertheless, the rollback does not work anymore*. Here is the error
generated :
org.apache.camel.spring.spi.TransactedRuntimeCamelException:
org.apache.camel.RollbackExchangeException: Exception occur on the exchange:
Exchange[Message: com.xpectis.x3s.platform.model.Request@1eefc33]
at
org.apache.camel.spring.spi.TransactionErrorHandler.wrapTransactedRuntimeException(TransactionErrorHandler.java:170)
at
org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:121)
at
org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at
org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:86)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
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:148)
at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:186)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:155)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
at
org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:70)
at
org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:45)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:65)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:62)
at
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:142)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:62)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
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:148)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:73)
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:63)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
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:148)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
at
org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
at
org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:198)
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:120)
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:93)
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)
Caused by: org.apache.camel.RollbackExchangeException: Exception occur on
the exchange: Exchange[Message:
com.xpectis.x3s.platform.model.Request@1eefc33]
at
org.apache.camel.processor.RollbackProcessor.process(RollbackProcessor.java:42)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
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:148)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:73)
at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
at
org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
at
org.apache.camel.processor.TryProcessor.handleException(TryProcessor.java:110)
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:78)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
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:148)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:186)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:155)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:186)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:155)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
at
org.apache.camel.spring.spi.TransactionErrorHandler.access$101(TransactionErrorHandler.java:41)
at
org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:114)
Regards,
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
On Thu, Jul 9, 2009 at 1:29 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> I have just commited a fix. Could you try again with latest code from
> trunk?
>
>
> On Thu, Jul 9, 2009 at 1:11 PM, Charles Moulliard<cm...@gmail.com>
> wrote:
> > Hi,
> >
> > The following camel route
> >
> > <camel:route>
> > <camel:from ref="directRequestEndpoint"/>
> > <camel:transacted ref="PROPAGATION_REQUIRED"/>
> > <camel:doTry>
> > <!-- Call the requestService to save the request -->
> > <camel:bean ref="serviceHelper"
> method="createRequest"/>
> > <camel:bean ref="serviceHelper" method="generateError"
> > />
> > <camel:to ref="queueRequestEndpoint" />
> > <camel:doCatch>
> >
> > <camel:exception>com.xpectis.x3s.exception.X3SException</camel:exception>
> > * <camel:rollback/>*
> > <camel:bean ref="serviceHelper"
> > method="processException"/>
> > <camel:to ref="queueReportingEndpoint" />
> > </camel:doCatch>
> > </camel:doTry>
> > </camel:route>
> >
> > generates an error at the line 42 of RollbackProcessor class :
> >
> > org.apache.camel.spring.spi.TransactedRuntimeCamelException:
> > org.apache.camel.RollbackExchangeException: null on the exchange:
> > Exchange[Message: com.xpectis.x3s.platform.model.Request@8aa95f]
> > at
> >
> org.apache.camel.spring.spi.TransactionErrorHandler.wrapTransactedRuntimeException(TransactionErrorHandler.java:170)
> > at
> >
> org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:121)
> >
> > Is the parameter message of RollbackProcessor mandatory now ?
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
Re: Is message of RollbackProcessor class mandatory - camel 2.0 ?
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
I have just commited a fix. Could you try again with latest code from trunk?
On Thu, Jul 9, 2009 at 1:11 PM, Charles Moulliard<cm...@gmail.com> wrote:
> Hi,
>
> The following camel route
>
> <camel:route>
> <camel:from ref="directRequestEndpoint"/>
> <camel:transacted ref="PROPAGATION_REQUIRED"/>
> <camel:doTry>
> <!-- Call the requestService to save the request -->
> <camel:bean ref="serviceHelper" method="createRequest"/>
> <camel:bean ref="serviceHelper" method="generateError"
> />
> <camel:to ref="queueRequestEndpoint" />
> <camel:doCatch>
>
> <camel:exception>com.xpectis.x3s.exception.X3SException</camel:exception>
> * <camel:rollback/>*
> <camel:bean ref="serviceHelper"
> method="processException"/>
> <camel:to ref="queueReportingEndpoint" />
> </camel:doCatch>
> </camel:doTry>
> </camel:route>
>
> generates an error at the line 42 of RollbackProcessor class :
>
> org.apache.camel.spring.spi.TransactedRuntimeCamelException:
> org.apache.camel.RollbackExchangeException: null on the exchange:
> Exchange[Message: com.xpectis.x3s.platform.model.Request@8aa95f]
> at
> org.apache.camel.spring.spi.TransactionErrorHandler.wrapTransactedRuntimeException(TransactionErrorHandler.java:170)
> at
> org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:121)
>
> Is the parameter message of RollbackProcessor mandatory now ?
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Is message of RollbackProcessor class mandatory - camel 2.0 ?
Posted by Charles Moulliard <cm...@gmail.com>.
The error is always there no matter if I use this route :
<camel:route>
<camel:from ref="directRequestEndpoint"/>
<camel:transacted ref="PROPAGATION_REQUIRED"/>
<camel:doTry>
<!-- Call the requestService to save the request -->
<camel:bean ref="serviceHelper" method="createRequest"/>
<!-- <camel:bean ref="serviceHelper"
method="generateError" /> -->
<camel:to ref="queueRequestEndpoint" />
<camel:doCatch>
<camel:exception>java.lang.Exception</camel:exception>
<camel:rollback/>
<camel:to ref="queueReportingEndpoint" />
</camel:doCatch>
</camel:doTry>
</camel:route>
or this one
<camel:route>
<camel:from ref="directRequestEndpoint"/>
<camel:transacted ref="PROPAGATION_REQUIRED"/>
<camel:doTry>
<!-- Call the requestService to save the request -->
<camel:bean ref="serviceHelper" method="createRequest"/>
<!-- <camel:bean ref="serviceHelper"
method="generateError" /> -->
<camel:to ref="queueRequestEndpoint" />
<camel:doCatch>
<camel:exception>java.lang.Exception</camel:exception>
<camel:to ref="queueReportingEndpoint" />
<camel:rollback/>
</camel:doCatch>
</camel:doTry>
</camel:route>
Strange. It was working beginning of this week.
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
On Thu, Jul 9, 2009 at 1:43 PM, Charles Moulliard <cm...@gmail.com>wrote:
> I will change my route and retest
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>
>
> On Thu, Jul 9, 2009 at 1:38 PM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> On Thu, Jul 9, 2009 at 1:11 PM, Charles Moulliard<cm...@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > The following camel route
>> >
>> > <camel:route>
>> > <camel:from ref="directRequestEndpoint"/>
>> > <camel:transacted ref="PROPAGATION_REQUIRED"/>
>> > <camel:doTry>
>> > <!-- Call the requestService to save the request -->
>> > <camel:bean ref="serviceHelper"
>> method="createRequest"/>
>> > <camel:bean ref="serviceHelper"
>> method="generateError"
>> > />
>> > <camel:to ref="queueRequestEndpoint" />
>> > <camel:doCatch>
>> >
>> >
>> <camel:exception>com.xpectis.x3s.exception.X3SException</camel:exception>
>> > * <camel:rollback/>*
>> > <camel:bean ref="serviceHelper"
>> > method="processException"/>
>> > <camel:to ref="queueReportingEndpoint" />
>> > </camel:doCatch>
>> > </camel:doTry>
>> > </camel:route>
>> Why do you do a routing after the rollback? Rollback should be that last
>> step.
>>
>> doCatch
>> // do something
>> // do something else
>> rollback()
>>
>>
>>
>>
>> >
>> > generates an error at the line 42 of RollbackProcessor class :
>> >
>> > org.apache.camel.spring.spi.TransactedRuntimeCamelException:
>> > org.apache.camel.RollbackExchangeException: null on the exchange:
>> > Exchange[Message: com.xpectis.x3s.platform.model.Request@8aa95f]
>> > at
>> >
>> org.apache.camel.spring.spi.TransactionErrorHandler.wrapTransactedRuntimeException(TransactionErrorHandler.java:170)
>> > at
>> >
>> org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:121)
>> >
>> > Is the parameter message of RollbackProcessor mandatory now ?
>> >
>> > Regards,
>> >
>> > Charles Moulliard
>> > Senior Enterprise Architect
>> > Apache Camel Committer
>> >
>> > *****************************
>> > blog : http://cmoulliard.blogspot.com
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>
>
Re: Is message of RollbackProcessor class mandatory - camel 2.0 ?
Posted by Charles Moulliard <cm...@gmail.com>.
I will change my route and retest
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
On Thu, Jul 9, 2009 at 1:38 PM, Claus Ibsen <cl...@gmail.com> wrote:
> On Thu, Jul 9, 2009 at 1:11 PM, Charles Moulliard<cm...@gmail.com>
> wrote:
> > Hi,
> >
> > The following camel route
> >
> > <camel:route>
> > <camel:from ref="directRequestEndpoint"/>
> > <camel:transacted ref="PROPAGATION_REQUIRED"/>
> > <camel:doTry>
> > <!-- Call the requestService to save the request -->
> > <camel:bean ref="serviceHelper"
> method="createRequest"/>
> > <camel:bean ref="serviceHelper" method="generateError"
> > />
> > <camel:to ref="queueRequestEndpoint" />
> > <camel:doCatch>
> >
> > <camel:exception>com.xpectis.x3s.exception.X3SException</camel:exception>
> > * <camel:rollback/>*
> > <camel:bean ref="serviceHelper"
> > method="processException"/>
> > <camel:to ref="queueReportingEndpoint" />
> > </camel:doCatch>
> > </camel:doTry>
> > </camel:route>
> Why do you do a routing after the rollback? Rollback should be that last
> step.
>
> doCatch
> // do something
> // do something else
> rollback()
>
>
>
>
> >
> > generates an error at the line 42 of RollbackProcessor class :
> >
> > org.apache.camel.spring.spi.TransactedRuntimeCamelException:
> > org.apache.camel.RollbackExchangeException: null on the exchange:
> > Exchange[Message: com.xpectis.x3s.platform.model.Request@8aa95f]
> > at
> >
> org.apache.camel.spring.spi.TransactionErrorHandler.wrapTransactedRuntimeException(TransactionErrorHandler.java:170)
> > at
> >
> org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:121)
> >
> > Is the parameter message of RollbackProcessor mandatory now ?
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
Re: Is message of RollbackProcessor class mandatory - camel 2.0 ?
Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jul 9, 2009 at 1:11 PM, Charles Moulliard<cm...@gmail.com> wrote:
> Hi,
>
> The following camel route
>
> <camel:route>
> <camel:from ref="directRequestEndpoint"/>
> <camel:transacted ref="PROPAGATION_REQUIRED"/>
> <camel:doTry>
> <!-- Call the requestService to save the request -->
> <camel:bean ref="serviceHelper" method="createRequest"/>
> <camel:bean ref="serviceHelper" method="generateError"
> />
> <camel:to ref="queueRequestEndpoint" />
> <camel:doCatch>
>
> <camel:exception>com.xpectis.x3s.exception.X3SException</camel:exception>
> * <camel:rollback/>*
> <camel:bean ref="serviceHelper"
> method="processException"/>
> <camel:to ref="queueReportingEndpoint" />
> </camel:doCatch>
> </camel:doTry>
> </camel:route>
Why do you do a routing after the rollback? Rollback should be that last step.
doCatch
// do something
// do something else
rollback()
>
> generates an error at the line 42 of RollbackProcessor class :
>
> org.apache.camel.spring.spi.TransactedRuntimeCamelException:
> org.apache.camel.RollbackExchangeException: null on the exchange:
> Exchange[Message: com.xpectis.x3s.platform.model.Request@8aa95f]
> at
> org.apache.camel.spring.spi.TransactionErrorHandler.wrapTransactedRuntimeException(TransactionErrorHandler.java:170)
> at
> org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:121)
>
> Is the parameter message of RollbackProcessor mandatory now ?
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus