You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "mahii.in87" <ma...@wipro.com> on 2013/08/29 14:37:00 UTC

Camel_exception_handling

Hi 

*Any one advice me on this code snippet.The exception block <onexception> is
not triggered when the expection is thrown.The address in <jaxws:client
id=""> is throwing target invocation error.But the exception handler is not
picking the exceptions.Advice me on the correct usage of exception handler
in this code snippet.*

<camelContext xmlns="http://camel.apache.org/schema/spring">
    <redeliveryPolicyProfile redeliveryDelay="25" maximumRedeliveries="3"
id="sapRedelivery"/>
    
      <onException redeliveryPolicyRef="sapRedelivery">
     
            <description>Re delivery Policy Ref</description>
            <exception>java.lang.Exception</exception>
            <redeliveryPolicy logRetryAttempted="true"
retryAttemptedLogLevel="WARN"/>
            <to uri="PersistFaildMsgsToEmaildb"/>
        </onException>
    <route>
        <from uri="bean name"/>

        <log logName="MCInput" loggingLevel="INFO" message="DATA for MC
${body}"/>
        <to uri="pi-mc"/>
      
    </route>
</camelContext>

<*jaxws:client id=""*
        address="http://otpidd01:7000/XISOAPAdapter/MessageServlet?"
        serviceClass="classname"
        username="om_sys_user"
        password="om_sys_user"
                
   /> 
  <bean id="pi-mc"
      class="com.classname"
     init-method="init" destroy-method="destroy">
    
     <property name="PIService" ref="PIServiceProxy"/>
       </bean>

Thanks 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-exception-handling-tp5738220.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel_exception_handling

Posted by Christian Posta <ch...@gmail.com>.
no, it will not. sounds like the error is being thrown when trying to
create the jaxws client when the spring context bootstraps? doesn't sound
related to camel, might have to ask the spring guys whats the best way to
handle exceptions on startup. best bet is to just correct the URL :)


On Thu, Aug 29, 2013 at 5:57 AM, pradeep <pr...@gmail.com> wrote:

> Hi,
>
> I believe the on exception clues will not catch the exception thrown while
> creating the jaxws:client. Because it catches the exceptions that are
> triggered with in a camel context. Might be i am wrong. You can use
> try/catch for catching the exceptions in a
> route(http://camel.apache.org/try-catch-finally.html).
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-exception-handling-tp5738220p5738223.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Camel_exception_handling

Posted by pradeep <pr...@gmail.com>.
Hi,

I believe the on exception clues will not catch the exception thrown while
creating the jaxws:client. Because it catches the exceptions that are
triggered with in a camel context. Might be i am wrong. You can use
try/catch for catching the exceptions in a
route(http://camel.apache.org/try-catch-finally.html).



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-exception-handling-tp5738220p5738223.html
Sent from the Camel - Users mailing list archive at Nabble.com.