Hi

What version of Camel and JSCH are you using?

And how have you configured the SFTP endpoint?

And can you paste the full stacktrace?



On Thu, Mar 3, 2011 at 4:00 PM, Marco Crivellaro
<mcr...@optasportsdata.com> wrote:
> Hi,
> I am experiencing an issue with and sftp producer, I am not sure if this
> should be considered a camel or a JCraft JSCH libray issue.
>
> The exchange run in exception when it comes to list check if file exists on
> destination org.apache.camel.component.file.remote.SftpOperations.existsFile
>
> I've found out Camel calls
> Vector files = channel.ls(directory); //line
> passing directory as an empty String causing JSCH to run on
> java.lang.StringIndexOutOfBoundsException
>
> this is where the JSCH library runs in exception:
>
>  private String remoteAbsolutePath(String path) throws SftpException{
>    if(path.charAt(0)=='/') return path;
>    String cwd=getCwd();
> //    if(cwd.equals(getHome())) return path;
>    if(cwd.endsWith("/")) return cwd+path;
>    return cwd+"/"+path;
>  }
>
>
>
> perhaps Camel should call the ls function passing "/" instead of and empty
> string in case the path of the file could not be extracted?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/issue-with-sftp-producer-tp3408052p3408052.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to