Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tFTPGet retrieves directory instead of file

Hi,
I'm having a problem using 'tFTPGet' component. In some .txt files, it is retrieving those files like they were directories...
For example, it creates a directory called "file1.txt" and gives me the error:
Exception in component tFTPGet_1
com.enterprisedt.net.ftp.FTPException: 550 /home/file1.txt: Not a directory.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:1201)
at com.enterprisedt.net.ftp.FTPClient.chdir(FTPClient.java:3723)
at test_di.ftp3_0_1.ftp3$1FTPGetter_tFTPGet_1.getAllFiles(ftp3.java:413)
at test_di.ftp3_0_1.ftp3$1FTPGetter_tFTPGet_1.getAllFiles(ftp3.java:444)
at test_di.ftp3_0_1.ftp3.tFTPGet_1Process(ftp3.java:614)
at test_di.ftp3_0_1.ftp3.tFTPConnection_1Process(ftp3.java:356)
at test_di.ftp3_0_1.ftp3.runJobInTOS(ftp3.java:852)
at test_di.ftp3_0_1.ftp3.main(ftp3.java:718)
If I delete that file from my remote directory, it will fail in another file...
I'm using the Filemask "*".
Do you know what could be happening?
Thanks.
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi, thank you for your answer. I found latter that I was having a problem in that FTP connection. The problem was not related to Talend!

View solution in original post

5 Replies
Anonymous
Not applicable
Author

What is your remote directory? I would suggest using always absolute path. It looks like you have used nothing or simply a dot for it.
Anonymous
Not applicable
Author

It seems to be all ok:
Local directory: "./NewFolder"
Remote directory: "/home/user/"
Filemask: "*"
Anonymous
Not applicable
Author

Hi
It looks strange to me that you specify the remote directory to "/home/user/", but it was trying to find a file under "/home/". Which version of Talend Studio are you using? I do a quick testing on v5.4.1, and it works. tFTPGet downloads all the files and its sub-folders in the specified directory if I set the filemask as "*".
Shong
Anonymous
Not applicable
Author

Hi, thank you for your answer. I found latter that I was having a problem in that FTP connection. The problem was not related to Talend!
suku1
Contributor
Contributor

Hi , Can you please share what issue is with FTP server? I am also facing similar issue. When I specifiy remote directory I am always geting error like below. 

Exception in component tFTPGet_1 (XXXXXX_PSA_Layer)
2: 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.cd(ChannelSftp.java:343)
at XXXXXX_demo.XXXXXX_psa_layer_0_1.XXXXX_PSA_Layer.tFTPGet_1Process(XXXXXXXX_PSA_Layer.java:776)
at ABC_XXX_demo.ABC_XXX_psa_layer_0_1.ABC_XXX_PSA_Layer.tFTPConnection_1Process(ABC_XXX_PSA_Layer.java:587)
at ABC_XXX_demo.ABC_XXX_psa_layer_0_1.ABC_XXX_PSA_Layer.runJobInTOS(ABC_XXX_PSA_Layer.java:1146)
at ABC_XXX_demo.ABC_XXX_psa_layer_0_1.ABC_XXX_PSA_Layer.main(ABC_XXX_PSA_Layer.java:966)
[statistics] disconnected