camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolf <>
Subject Cannot get filter() to work with "mandatoryBodyAs"
Date Tue, 11 Jun 2013 14:12:30 GMT
I want to impose a filter such that only messages whose body is of
type RemoteFile get through,
So per the documentation:

I have:


But I get:

org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message: {}]
	at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(
	at org.apache.camel.builder.ExpressionBuilder$33.evaluate(
	at org.apache.camel.util.ExpressionToPredicateAdapter.matches(
	at org.apache.camel.builder.SimpleBuilder.matches(
	at org.apache.camel.processor.FilterProcessor.process(
Caused by: java.lang.ClassNotFoundException: RemoteFile.class
	at org.apache.camel.impl.DefaultClassResolver.resolveMandatoryClass(
	at org.apache.camel.builder.ExpressionBuilder$33.evaluate(
	... 67 more

...even though I imported RemoteFile.  So then I tried:


and I get the same ClassNotFoundException, but with the full classname.

How can I filter messages, such that only messages whose in-body is
non-null and of a certain type get through?



View raw message