camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Morgan <james.morga...@gmail.com>
Subject Error when testing route config when using both onException and errorHandler in test which extend CamelSpringTestSupport
Date Fri, 14 Jan 2011 12:59:17 GMT
I have a working routing config, reasonably simple, just consumes from a
queue and does a little processing, it also has a a dead letter channel
defined.


I wanted to add an onException route for a specific exception which is
thrown from within a processor.

Exception extends RuntimeException (not sure if this make a difference)

When I add the below to catch this exception and do stuff with it, my tests
now throw some weird exception.

Exception I get is:

*Caused by: org.apache.camel.CamelExchangeException: No consumers available
on endpoint: Endpoint[direct://my-test-endpoint]*
*
*
As soon as I remove the onException route it passes.

I've been playing this for afew hours, cant find anything that's wrong. Even
when i print out the routes defined from in my test I see them all there?

Do you have any idea what's wrong?


onException(CustomException.class)
.handled(true)
 .process(new Processor() {
@Override
public void process(final Exchange exchange) throws Exception {
 // do stuff
}
})
 .to(deadLetterUri).end();

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message