SFTP_JAVA job fails when attempting to put a file to an empty directory on a remote SFTP server.

Document ID : KB000089398
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
SFTP_JAVA job fails when attempting to put a file to an empty directory on a remote SFTP server.
Resolution:
Error MessageDetails: 

Error messages seen in the job outputfile may be similar these:

2014-04-29 12:38:12No such file: /MasterDNCFilter/

or

 2014-07-09 13:14:26File not found

Symptoms

While using an SFTP_JAVA job to connectto a remote SFTP server to put a file empty directory, the job fails with a 'Nosuch file'  or 'File not found' errormessage being displayed in the job output file and the file is not transferred.


Cause

We have seen instances where theremote third party that manages the remote server deletes files from the remotedirectory when it meets some criteria to automatically clean their system orwhere a directory is empty. If theremote directory is empty, the SFTP_JAVA job will fail.


Workaround

1) Request that thethird party vendor leave a file in the directory so that the directory is neverempty.

2) In some casesupdating the third party utility (jcraft) that we use for the SFTP_JAVA job sothat it uses a more recent jar file enables you to transfer a file to an emptydirectory on the remote SFTP server. 

We shipwith jsch-0.1.39.jar file and that file is used for our SFTP_JAVA job. If you would like to update that file, pleasefollow the steps outlined below.

Download the newer file at:

http://www.jcraft.com/jsch/

Scroll down to the Downloadsection download the jsch-0.1.51.jar. Movethe current jsch-0.1.39.jar file to $AW_HOME and place the newer file(jsch-0.1.51.jar) in the $AW_HOME/web/classes directory. Then re-run the failedSFTP_JAVA job.