camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirko Caserta <>
Subject Error handling with transaction
Date Tue, 02 Aug 2011 10:19:47 GMT
Hi there,
I'm having an issue I don't understand.

I have a transactional route defined like this:

        <route id="accountingRoute">
            <from uri="cxf:bean:resellerAccountingEndpoint"/>
                <bean ref="inboundErrorHandler"/>
                <wireTap ref="databaseInput"/>
                <rollback markRollbackOnly="true"/>
            <choice id="depositSplitterChoice">

You can see I don't have handled=true in the onException block. That's
because my inboundErrorHandler bean does an
exchange.setException(soapFaultInstance) so that cxf is happy and
returns the right soap fault message.

The issue I'm having is that, after my inboundErrorHandler has done
its job catching a SocketTimeoutException (I can see the soapFault
instance logged by the Tracer), I get a NPE in camel which makes my
endpoint return a:

<soap:Envelope xmlns:soap="">

The relevant stack trace portion is:

Caused by: org.apache.camel.RuntimeCamelException:
	at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(
	at org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(

Am I doing something wrong or is this a bug in camel?

I can provide logs, route definitions, code... anything you might need
in case someone wishes to debug this.

Thanks in advance, Mirko.

View raw message