[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16396425#comment-16396425
 ] 

abccbaandy commented on CAMEL-12337:


I tried latest 2.20.3-SNAPSHOT, look everything work as expected.

thanks, look forward to 2.20.3 released :)

> 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, 2.21.0
>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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395481#comment-16395481
 ] 

Claus Ibsen commented on CAMEL-12337:
-

You can wait until the CI server has built a new one, but make sure its a new 
build and not the previous timestamp you are testing again

> 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, 2.21.0
>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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395470#comment-16395470
 ] 

abccbaandy commented on CAMEL-12337:


I use this repo to get the previous snapshot.
https://repository.apache.org/content/repositories/snapshots/

I have to build the snapshot by myself this time? or just wait few hours?

> 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, 2.21.0
>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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395394#comment-16395394
 ] 

Claus Ibsen commented on CAMEL-12337:
-

Okay pushed a fix, can you rebuild SNAPSHOT and test again.

> 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
>
>
> 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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395330#comment-16395330
 ] 

Claus Ibsen commented on CAMEL-12337:
-

Yeah we should have guarded that change dir operation as well.

> 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
>
>
> 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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395193#comment-16395193
 ] 

abccbaandy commented on CAMEL-12337:


sftp
{code:java}
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
change directory to: notexist
at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:609)
at 
org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:597)
at 
org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:108)
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: 2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
at com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:2367)
at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:342)
at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:607)
{code}

ftp
{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}


> 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.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=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)

[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395103#comment-16395103
 ] 

Claus Ibsen commented on CAMEL-12337:
-

Post the updated stacktrace

> 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.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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395100#comment-16395100
 ] 

abccbaandy commented on CAMEL-12337:


It just print the same message in the description

> 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.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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395093#comment-16395093
 ] 

Claus Ibsen commented on CAMEL-12337:
-

Can you post the stacktrace/error you have with stepwise=true. 

> 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.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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-11 Thread abccbaandy (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16394749#comment-16394749
 ] 

abccbaandy commented on CAMEL-12337:


Hi, I saw you resolve this issue, so I try the latest 2.20.3-SNAPSHOT.

After some try & error. I found it only work when I use stepwise=false option, 
is it intentional?

> 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.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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-09 Thread abccbaandy (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16393315#comment-16393315
 ] 

abccbaandy commented on CAMEL-12337:


Those exception I post in the Description is WARN in the logs, and I use 
autoCreate=false because I only have read permission.

btw I update my previous comment, hope it's enough to understand.

> 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
>Priority: Minor
>
> 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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16393283#comment-16393283
 ] 

Claus Ibsen commented on CAMEL-12337:
-

And how do you run that code, eg what do you do with that endpoint to poll 
those files, can you show more of that

> 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
>Priority: Minor
>
> 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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16393281#comment-16393281
 ] 

Claus Ibsen commented on CAMEL-12337:
-

Do you see any WARN in the logs, something about cannot auto-create directory 
or something?

> 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
>Priority: Minor
>
> 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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-09 Thread abccbaandy (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16393152#comment-16393152
 ] 

abccbaandy commented on CAMEL-12337:


yes and no.

In fact, I need a way to control the exception"s", especially file/directory 
not found.

In my case, it's not error when directory not found, but I still need to know 
if there is 0 file in the directory or the directory not exist.

for ex:
mylog.log
[0:00] dir not exist
[0:10] dir not exist
[0:20] dir not exist
[0:30] dir not exist
[0:40] 0 files process  <= directory exist, but no file yet !!
[0:50] 2 files process
[1:00] 23 files process
...

Current "file not found" exception is too verbose to me, and I can't format it.

> 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
>Priority: Minor
>
> 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=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 

[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16393080#comment-16393080
 ] 

Claus Ibsen commented on CAMEL-12337:
-

Are you saying you want the ftp consumer to ignore any kind of failure if the 
directory you configured does not exists, and silently do not log any kind of 
error etc?

> 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
>Priority: Minor
>
> 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=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)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16393077#comment-16393077
 ] 

Claus Ibsen commented on CAMEL-12337:
-

This is for when downloading *files* and was not originally intended for when 
failing to list directories. 

> 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: Bug
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Priority: Major
>
> 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=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)