I have a java web application that creates a file in a folder. These files are picked up by a camel route that pgp encrypts it and then ftp's it. Initially, I had it as one route and it worked on my windows servers. Then it stopped working. So, I split it into two routes that way even if ftp fails I won't have unencrypted files lying on the server. Plus, I can manually ftp those, if needed (not ideal). Now, it works on one server but not another. Both are windows servers, my application server is tomcat.
Is there a reliable way to make this work across servers?
The routes are shown below
<route id="file_encrypt">
<from uri="file://{{rootOutputDirectory}}/thirdparty/outbound?readLock=rename&delete=true"/>
<setHeader headerName="cryptoKeyFile">
<simple>${properties:thirdparty.pgpkey}</simple>
</setHeader>
<to uri="bean:PGPEncryptProcessor"/>
<to uri="file://{{rootOutputDirectory}}/thirdparty/outbound/encrypted"/>
</route>
<route id="file_ftp">
<from uri="file://{{rootOutputDirectory}}/thirdparty/outbound/encrypted/?readLock=rename&move=.done&moveFailed=.error"/>
<to uri="ftp://{{thirdparty.ftp.user}}@{{thirdparty.ftp.url}}{{thirdparty.ftp.outgoingdir}}/?password={{thirdparty.ftp.password}}&binary=true"/>
</route>
The value of thirdparty.ftp.outgoingdir is
thirdparty.ftp.outgoingdir=/test/incoming
I see the following error in the log
org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: 550 Failed to change directory.
It seems like the issue listed here - http://camel.465427.n5.nabble.com/Cannot-change-directory-to-quot-Code-550-on-FTP-component-td5734612.html. However, it is not clear why it works on one server but not another with the same settings.