Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache Camel FTP: Publishing Content to FTP Servers with Camel FTP Component.  RSS feed

Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I was working on a service where the User Interface sends out two files in JSON format (A .js file) as Multipart. This I have already done. But problem is different. When the file is sent to FTP server and if the FTP server fails to respond or has problem connecting to FTP server, then I am not able to catch hold of that exception in any way. Below is the code piece

Process that should happen:

1. At the root folder of the FTP, there is file that needs to be deleted
2. Before deleting that file, the file should be taken as a backup and placed in one of the subdirectory.
3. After that from the request I need read the data and produce a file that should be placed in the ftp root directory.

For all the above only a single FTP server is available and there are three different calls happening.
First call is to download the file from
Pass this on to
Read the file from request params and place it in

And this is how my FTP URL Looks like
URL 1: Consumer URL for downloading the file

URL 2: Producer URL for moving to backup folder and adding current date to the fileName


Since URL 1 and URL 2 is written inside the processor when exception happens like unable to connect to FTP, onException is not able to handle that properly. And the route ends with a lot of stack trace.

And all of this is happening with only one single FTP server. No additional servers are available for the same.

Kindly help as this is a bit urgent and I need to deliver the service soon.

Thanks & Regards
Dilip H Pashupathi
Hey! Wanna see my flashlight? It looks like this tiny ad:
ScroogeXHTML 7.2 - RTF to HTML5 / XHTML converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!