camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpcook <>
Subject Simple File Filter
Date Tue, 16 Feb 2010 16:30:26 GMT


I am trying to listen to a file directory for specific files and have
implemented my own GenericFileFilter however I am getting an error and hoped
someone could help.

I'm just using java dsl, with no spring and have this from line.

My filter is very simple:
public class PictureRSSFileFilter implements GenericFileFilter {

	public boolean accept(GenericFile pathname) {
		return pathname.getFileName().endsWith(".rss10");


The error I am getting is:
org.apache.camel.FailedToCreateRouteException: Failed to create route
route1: Route[[From[file://\\\ine...
because of Failed to resolve endpoint:
due to: Could not find a suitable setter for property: filter as there isn't
a setter method with same type: java.lang.String nor type conversion
possible: No type converter available to convert from type: java.lang.String
to the required type: org.apache.camel.component.file.GenericFileFilter with

I'm sure it is something simple, I have looked at a couple of unit tests
such as this one:

And wondered whether I should be using filter=#myfilter in thr uri and
whether I had to register the filter in the jndi registry or add it to the
context like you do with the routes eg)
context.addRoutes(new PictureGalleryRouteBuilder());

Really appreciate any help.
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message