« Return to Thread: Ftp component woes

Ftp component woes

by Ryadh Amar :: Rate this Message:

Reply to Author | View in Thread

Hello List,
Currently evaluating Camel, I am having a tough time making the Ftp component work
I am trying to monitor files from an ftp server, and as they arrive, store them in the local filesystem,
this is documented extensively in the official documentation (in the Ftp component section) and discussed throughly in the mailing list, but still I can't make it work
My setup:
Camel 1.3
FileZilla server, a login and no password
Tried with jre5 and jre6
My code:
====================================================
package org.apache.camel.example.ftptofile;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;

public final class CamelFtpToFileExample {

        public static void main(String args[]) throws Exception {
                CamelContext context = new DefaultCamelContext();
                context.addRoutes(new RouteBuilder() {
                        public void configure() throws Exception {
                                String ftpUrl = "ftp://guest@localhost:"
                                                + "21"
                                                + "/incoming?binary=true"
                                                + "&consumer.delay=2000&consumer.setNames=true";
                                String fileUrl = "file:///c:/inputdir/?noop=true&autoCreate=true";
                                from(ftpUrl).to(fileUrl);
                        }
                });
                context.start();
        }
}
===============================================
Symptoms:
After having configured log4j to log to the trace level, when the application is started, here is what the console outputs:
......
DEBUG ScheduledPollConsumer:61 - Starting to poll
WARN FtpConsumer:57 - FtpConsumer's client isn't connected, trying to reconnect...
INFO FtpConsumer:59 - Connected to ftp://guest@localhost:21/incoming

I expected the console to output messages every 2 seconds(at least the Polling part), but after the above messages, nothing much happens and the application still runs.

And of course, no files are to be found in the specified directory

Thank you in advance for your help, ......and what a great product ;)

 « Return to Thread: Ftp component woes

LightInTheBox - Buy quality products at wholesale price!
Need professional support or training for Apache Camel? Graphic Design by Hiram and the Nabble Forum configured by James