I've tried with:

            <from uri="cxf:bean:resellerAccountingEndpoint"/>
            <onException>
                <exception>java.lang.Exception</exception>
                <bean ref="inboundErrorHandler"/>
                <wireTap ref="databaseInput"/>
                <rollback markRollbackOnly="true"/>
            </onException>
            <transacted/>
            <choice id="depositSplitterChoice">
            ...snip...

but I get the same message flow + NPE at the end.

Mirko

On Tue, Aug 2, 2011 at 2:45 PM, Claus Ibsen <[email protected]> wrote:
> Hi
>
> Could you try swapping the order of <transacted/> and <onException>.
>
>
> On Tue, Aug 2, 2011 at 12:19 PM, Mirko Caserta <[email protected]> 
> wrote:
>> 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"/>
>>            <transacted/>
>>            <onException>
>>                <exception>java.lang.Exception</exception>
>>                <bean ref="inboundErrorHandler"/>
>>                <wireTap ref="databaseInput"/>
>>                <rollback markRollbackOnly="true"/>
>>            </onException>
>>            <choice id="depositSplitterChoice">
>>            ...snip...
>>
>> 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="http://schemas.xmlsoap.org/soap/envelope/";>
>>   <soap:Body>
>>      <soap:Fault>
>>         <faultcode>soap:Server</faultcode>
>>         <faultstring>java.lang.NullPointerException</faultstring>
>>      </soap:Fault>
>>   </soap:Body>
>> </soap:Envelope>
>>
>> The relevant stack trace portion is:
>>
>> ...snip...
>> Caused by: org.apache.camel.RuntimeCamelException:
>> java.lang.NullPointerException
>>        at 
>> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
>> ~[camel-core-2.7.2.jar:2.7.2]
>>        at 
>> org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:178)
>> ~[camel-spring-2.7.2.jar:2.7.2]
>>        at 
>> org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
>> ~[spring-tx-3.0.5.RELEASE.jar:3.0.5.RELEASE]
>> ...snip...
>>
>> 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.
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Reply via email to