<onException> should be after <from>. And the option inheritErrorHandler="false" should be removed.
On Wed, May 29, 2013 at 1:13 AM, salemi <sal...@avaya.com> wrote: > Hi All, > > we throw an exception in the gsInterface bean but the exception never get > caught by the onException clause in the route below. > > What am I doing wrong here? > > Thanks, > Ali > > <route id="gigaspacesInterface" > shutdownRunningTask="CompleteCurrentTaskOnly" autoStartup="true"> > > <from uri="direct:gigaspacesInterface"/> > <to uri="bean:gsInterface?method=write"/> > <onException inheritErrorHandler="false" > useOriginalMessage="true"> > > <exception>org.springframework.dao.DataAccessException</exception> > <redeliveryPolicy maximumRedeliveries="3" > redeliveryDelay="1000" > logRetryAttempted="true" retryAttemptedLogLevel="DEBUG"/> > <handled><constant>true</constant></handled> > <marshal ref="ccisJSON" /> > <log loggingLevel="INFO" message=" #### FROM ROUTE: > An Exception > is caught #### ${body}"></log> > <to > uri="file:/tmp/APCBadMsgs?fileName=badMsgs&autoCreate=true" > /> > </onException> > > <log loggingLevel="INFO" message="gigaspacesInterface route > writes into GS: ${body}\n"/> > </route> > > > > ----- > Alireza Salemi > -- > View this message in context: > http://camel.465427.n5.nabble.com/Exception-doesn-t-get-cauhgt-in-the-route-tp5733381.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen