[ 
https://issues.apache.org/activemq/browse/CAMEL-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45053#action_45053
 ] 

Claus Ibsen commented on CAMEL-834:
-----------------------------------

Yes the TRACE logging should output what directory it tries to poll

        if (log.isTraceEnabled()) {
            log.trace("Polling directory: " + dir);
        }

So if you can enable the TRACE logging on camel 1.5-SNAPSHOT and see what is 
happening.
Also the new feature for exclusive read lock might have an influce. So setting 
consumer.exclusiveReadLock=false could help also.

> Trailing slash missing in SftpConsumer
> --------------------------------------
>
>                 Key: CAMEL-834
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-834
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 1.4.0
>         Environment: Windows Vista Business, JDK 1.6.0_05
>            Reporter: Aleksandar Vidakovic
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> When this route 
> {code}
>     <camel:route>
>         <camel:from uri="sftp://[EMAIL 
> PROTECTED]/path/to/directory/?password=secret&amp;directory=true&amp;binary=true&amp;consumer.useFixedDelay=false&amp;consumer.setNames=true&amp;consumer.recursive=false"
>  />
>         <camel:to uri="file:///C:/camel/output/" />
>     </camel:route>
> {code}
> is configured the files in the remote directory are download, but subsequent 
> calls of the method "pollDir" result in this exception:
> {code}
> [ Thread: 1 RemoteFileComponent] SftpConsumer                   WARN  Caught 
> SftpException:2: No such file
> [ Thread: 1 RemoteFileComponent] SftpConsumer                   WARN  Doing 
> nothing for now, need to determine an appropriate action
> [ Thread: 1 RemoteFileComponent] ScheduledPollConsumer          WARN  An 
> exception occured while polling: Endpoint[sftp://[EMAIL 
> PROTECTED]/path/to/directory/?password=secret&amp;directory=true&amp;binary=true&amp;consumer.useFixedDelay=false&amp;consumer.setNames=true&amp;consumer.recursive=false]:
>  No such file 2: No such file
> {code}
> As you can see the slash is definitely in the configured route. If I check 
> for the missing slash and add it to the dir variable (line 115 in 
> SftpConsumer) then the consumer works:
> {code}
>       if(!dir.startsWith("/")) {
>               dir = "/" + dir;
>       }
> {code}
> Didn't have the time to have a closer look. The root cause of the missing 
> slash is somewhere else.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to