I did more debugging and found the cause

If you have streamDownload=true 

Take a look at 
org.apache.camel.component.file.remote.FtpOperations.retrieveFileToStreamInBody(....)

at line 345

            if (endpoint.getConfiguration().isStreamDownload()) {
                InputStream is = client.retrieveFileStream(remoteName); 
                target.setBody(is);
               
exchange.getIn().setHeader(RemoteFileComponent.REMOTE_FILE_INPUT_STREAM,
is);
                result = true;
            } else {
                os = new ByteArrayOutputStream();
                target.setBody(os);
                result = client.retrieveFile(remoteName, os);
            }

If you have streamDownload=true (the default is false) the FTPClient gets
into a different state than what FTPOperations expects.  Then from that
point on, every time there is a call to FTPClient, the FTPClient is "one
call behind" what FTPOperations thinks it is and you get strange behavior.

I am hoping that this is enough info for the people that are knowledgeable
of this code to see the issue.  



--
View this message in context: 
http://camel.465427.n5.nabble.com/FTP-Move-fails-have-found-cause-but-don-t-understands-why-tp5748358p5748371.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to