I have the following error:

Caused by: java.lang.IllegalArgumentException: Only directory is supported.
Endpoint must be configured with a valid directory: ftp.test
        at
org.apache.camel.component.file.remote.RemoteFileEndpoint.createConsumer(RemoteFileEndpoint.java:68)
        at
org.apache.camel.component.file.remote.RemoteFileEndpoint.createConsumer(RemoteFileEndpoint.java:31)
        at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:60)
        at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:83)
        at org.apache.camel.impl.RouteService.doStart(RouteService.java:123)
        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:55)
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:906)
        ... 1 more

By looking at the source code I saw the following :
        // we assume its a file if the name has a dot in it (eg foo.txt)
        if (configuration.getDirectory().contains(".")) {
            throw new IllegalArgumentException("Only directory is supported.
Endpoint must be configured with a valid directory: "
                    + configuration.getDirectory());
        }

I remove that code and my code is working!! :-)

I think the above code should not assume that.....
What do you think ? 

(using : camel 2.1.0)

Simon
-- 
View this message in context: 
http://old.nabble.com/FTP-assume-directory-do-not-have-dot-tp27153817p27153817.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to