One Star

FTP Components

Hi,
I'm trying to use the ftp components to iterate through a list of directories. I'm only interested in the archive directories within these directories. I've attached a screenshot of how the job looks currently.
The dir structure is as follows
-processing_area (main dir)
-dir1
-subdir1
-subdir2
-archive
-subdir3
-dir2
-subdir1
-subdir2
-dir3
-subdir1
-subdir2
-archive
-subdir3
-subdir4
i have the job with 2 tftpfilelist componets, the first has the remote directory set as the main dir so i drop straight into this. then this loops through the dir's listing all these, that bits fine. i then need to put a check in place to make sure that within the dir the archvie dir exists. I've tried using the tftpfileexists but however i set this up i can't seem to get it to check correctly. its ((Boolean)globalMap.get("tFTPFileExist_1_EXISTS")) value comes back as false ok, but if the archive dir does exists i get this:
connecting to socket on port 3463
connected
./processing_area/dir3 (printed from tjava1)
false (printed from tjava3)
./processing_area/dir4 (printed from tjava1)
false (printed from tjava3)
./processing_area/dir2 (printed from tjava1)
false (printed from tjava3)
./processing_area/dir1 (printed from tjava1)
Exception in component tFTPFileExist_1
com.enterprisedt.net.ftp.FTPException: Unable to determine if file './processing_area/dir1/archive/' exists.
at com.enterprisedt.net.ftp.FTPClient.exists(FTPClient.java:1941)
at spitfire.dfat_ftp_get_0_1.DFAT_FTP_Get.tFTPFileList_1Process(DFAT_FTP_Get.java:545)
at spitfire.dfat_ftp_get_0_1.DFAT_FTP_Get.runJobInTOS(DFAT_FTP_Get.java:841)
at spitfire.dfat_ftp_get_0_1.DFAT_FTP_Get.main(DFAT_FTP_Get.java:728)
disconnected
There isnt a component tftpfolder exists so what am i doing wrong?!
I've tried these sorts of settings for the tftpfileexists component and more, too many to list all of them:
remote dir: ((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH"))
filename: "archive/"
remote dir: ((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")) + "archive"
filename: "/"
remote dir: ((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")) + "archive/"
filename: ""
Also the ftp components seem to have trouble using the same shared connection?! This only works if each component reconnect to the server, and obviously this isnt an ideal solution.
We're using TIS 3.2.2 (java)
3 REPLIES
Community Manager

Re: FTP Components

Hello
com.enterprisedt.net.ftp.FTPException: Unable to determine if file './processing_area/dir1/archive/' exists.

Is the file on a French FTP server? There is a bug on tFtpFileExist component, see 12676.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: FTP Components

Hi all
I am quite new using talend open studio v5.5.1 and it seems that every week i have to restart my FTP file polling job, because it looses connection in our production server. 
One Star

Re: FTP Components

I want to get the value from a ftp server with ip   and I doesn't know its host name all the examples for the tFtp_Connection shows a hostname as its input in host field of tFtp_Connectionsettings and also I want to know what is value to be given in the KeyStoreFile field.