Hi All,

Camel doesn't support absolute path based on the documentation - Where 
directoryname represents the underlying directory. The directory name is a 
relative path. Absolute paths are not supported.

Due to which when we send /Home/Inbound/Data.csv as part of the URL, the actual 
value reaching to JSCH for writing becomes /Home/Inbound/Home/Inbound/Data.csv 
& we get exception - No Such File.

JSCH version 0.1.50 & Apache Camel 1.16.3 version
--------------------------------------------------------------


1.       com.jcraft.jsch.ChannelSftp.put(InputStream, String, 
SftpProgressMonitor, int) --> gets second parameter as Home/Inbound

2.       com.jcraft.jsch.ChannelSftp.remoteAbsolutePath(String)

a.       Tries to get Cwd

b.      Tries to get Home, which comes back as /Home/Inbound

3.       Path becomes /Home/Inbound/Home/Inbound

Writing for file fails as the folder doesn't exists.

Question 1: Anyone has any resolution how to resolve this. Camel always strip 
all '/' before sending it to JSCH to support only relative path.

Question 2: Also, Can we configure something on Sftp server that 'getHome' 
method returns '/' rather /Home/Inbound?

Regards,
Arpit.


Reply via email to