I changed my routing and added a catch for an exception. I thought everything was running fine but apparently it doesn't. I still get this exception:
Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot retrieve file: GenericFile[DZ_20120104_DZ_004.PDF] from: Endpoint[ftp://server?delay=300000&delete=true&disconnect=true&password=******&username=user] org.apache.camel.component.file.GenericFileOperationFailedException: Cannot retrieve file: GenericFile[DZ_20120104_DZ_004.PDF] from: Endpoint[ftp://server?delay=300000&delete=true&disconnect=true&password=******&username=user] at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:338) at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:94) at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:175) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:136) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:140) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) I changed my route to this: //XML Predicate //only allows names without spaces Predicate xmlPredicate = header(CAMEL_FILE_NAME).regex("([\\S]+(\\.(?i)(xml))$)"); //Images Predicate //only allows names without spaces Predicate imgPredicate = header(CAMEL_FILE_NAME).regex("([\\S]+(\\.(?i)(jpg|png|gif))$)"); //PDF Predicate //only allows names without spaces Predicate pdfPredicate = header(CAMEL_FILE_NAME).regex("([\\S]+(\\.(?i)(pdf))$)"); onException(SchemaValidationException.class) .to("file://" + props.getProperty(ROOT_DIR) + "/invalid"); from("ftp://" + props.getProperty(FTP_URL) + "?username=" + props.getProperty(FTP_USER) + "&password=" + props.getProperty(FTP_PWD) + "&disconnect=true&delete=true&delay=" + props.getProperty(FTP_DELAY)) .choice() .when(xmlPredicate) .to("jms:xmlQueue") .when(imgPredicate) .to("file://" + props.getProperty(ROOT_DIR) + "/img") .when(pdfPredicate) .to("file://" + props.getProperty(ROOT_DIR) + "/pdf") .otherwise() .to("file://" + props.getProperty(ROOT_DIR) + "/junk"); from("jms:xmlQueue") .to("validator:FtpXmlValidator.xsd") .to("xslt://XmlToRssConverter.xsl") .to("file://" + props.getProperty(ROOT_DIR) + "/rss"); It was already running for a week now. This error occured when I dropped like 42 pdf's (size between 5- 10 mb) on the ftp server. But the days before it processed 435 files, sporadicly added to the server, like 5 at a time or less. It seems like the ftp has problems when it has to fetch a large numbers of files. When I first run camel, it started to process the ftp server, at the moment there were 1200 files stored on it. All xml files or small images, so is it running out of memory or what is causing this exception. Do I need to add more memory to the JVM? Or is it something else? Like I mentioned before I'm using : Debian 5.0 java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing) Hopefully you guys have some advise regards Camel: 2.9.0 -- View this message in context: http://camel.465427.n5.nabble.com/Exception-FTP-Component-tp5148122p5160347.html Sent from the Camel - Users mailing list archive at Nabble.com.