camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pointless <pointless2...@yahoo.com>
Subject Re: global onException clause wrongly identifies route in which exception occurs (log name)
Date Thu, 08 Dec 2011 13:30:58 GMT
I have just tried to throw an exception explicitly:

           * <route id="customerpaymentstatusreportv03.MainRouteEE">*
            <from ref="queue_ee" />
                        <transacted ref="PROPAGATION_REQUIRED" />
            <setExchangePattern pattern="InOnly" />
                        
    <to
uri="log:customerpaymentstatusreportv03.MainRouteEE?showProperties=false&amp;showExchangeId=true&amp;showHeaders=false&amp;showBody=false&amp;level=DEBUG"/>
* <throwException ref="forced" />*
   	 <setProperty propertyName="REQUEST_ID">
   	 <xpath
resultType="java.lang.String">concat(//urn:CstmrPmtStsRpt/urn:GrpHdr/urn:MsgId,
",", //urn:CstmrPmtStsRpt/urn:OrgnlGrpInfAndSts/urn:OrgnlMsgId)</xpath>
   	 </setProperty>
                        <log
message="Exchange[Id:${exchangeId}];${property.REQUEST_ID}"
loggingLevel="INFO" />
                        
            <to ref="call_esb_service" />
                        <log
message="Exchange[Id:${exchangeId}];${property.REQUEST_ID};Service
successfully executed." loggingLevel="DEBUG" />
           	</route>

<bean id="forced" class="java.lang.IllegalArgumentException">
   <constructor-arg index="0" value="This is forced"/>
</bean>

and results are  the same:

2011-12-08 15:22:04,477 | DEBUG | customerpaymentstatusreportv03.MainRouteEE
| Exchange[Id:ID:414d512056494c3130375544202020204e9d7a7122269303,
ExchangePattern:InOnly, BodyType:String]
2011-12-08 15:22:04,482 | ERROR |
*customerpaymentstatusreportv03.SharedRoute* |
Exchange[Id:ID:414d512056494c3130375544202020204e9d7a7122269303];;Error has
occurred: This is forced. Stacktrace: java.lang.IllegalArgumentException:
This is forced
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
	at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:108)
	at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
	at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
	at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
	at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
	at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
	at java.lang.Thread.run(Thread.java:662)


--
View this message in context: http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-tp5058304p5058757.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message