[ https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-12337: -------------------------------- Fix Version/s: 2.22.0 > camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found > ------------------------------------------------------------------------------ > > Key: CAMEL-12337 > URL: https://issues.apache.org/jira/browse/CAMEL-12337 > Project: Camel > Issue Type: Improvement > Components: camel-ftp, camel-sftp > Affects Versions: 2.20.2 > Reporter: abccbaandy > Assignee: Claus Ibsen > Priority: Minor > Fix For: 2.20.3, 2.21.1, 2.22.0 > > > I tried something like these code, but when "notexist" folder not exist, it > still give me exception > {code:java} > sftp://testserver:22/notexist?autoCreate=false&ignoreFileNotFoundOrPermissionError=true > {code} > {code:java} > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > list directory: notexist > at > org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650) > at > org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118) > at > org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80) > at > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124) > at > org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: com.jcraft.jsch.SftpException: No such file > at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873) > at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225) > at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242) > at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592) > at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553) > at > org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641) > ... 12 common frames omitted > {code} > ftp has the same issue. > {code:java} > org.apache.camel.component.file.GenericFileOperationFailedException: File > operation failed: 550 The system cannot find the file specified. > Cannot change directory to: notexist. Code: 550 > at > org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790) > at > org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768) > at > org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112) > at > org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83) > at > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124) > at > org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)