I've been using commons.net.ftp.FTPClient for over a year now, without any problems. Suddenly, when calling FTPClient.listFiles(), some of the entries in the returned list are NULLs (ie: some of the files on the server are listed, and some result in NULLs). But FTPClient.listNames() returns the filenames correctly! I'm at my wits end. Has anyone else had this problem before?
nothing. But files that were uploaded before yesterday are working fine (they show up in the .listFiles() results), and files that were added since then are returning NULLs in the .listFiles() results (one NULL entry for each file). So I get a mix of normal FTPFile instances, and NULLs.
Joined: Mar 29, 2006
update: If I call .listNames(), then cycle through the results, calling .listFiles for each filename, I get an empty array for each problem file...
Originally posted by Philippe Desrosiers: nothing.
No, something changed on your server. For example, there are different files on the server today than were there yesterday. And for example today is February 29 and not February 28, although you wouldn't think that software would have leap-year problems after all these years. Something is different.
Have you tried connecting to the FTP server from the command line and doing a DIR command to see what you can see?
I've just started using the commons net FTPClient in the past two days and today experienced this same problem with files that have a Feb 29 timestamp. Everything has pointed to a leap-year problem with commons.net.ftp.FTPClient.
All other FTP clients have no problems on the same server (not controlled by me but used by '00s of others).
At least it won't bother us again for another 4 years