You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Kathy Lo <ka...@gmail.com> on 2008/03/05 09:04:44 UTC

[ftp] Fail to create FTPFile object on some directories/files when calling listFiles()

Dear all,

In server-side, it uses vsftpd 2.0.3 as FTP Server. In client-side, it
uses common-net-1.4.1 Java package to communicate with FTP Server
through Java program. Both the server and client are running Linux FC
4

In client side, I wrote a Java program to call FTPClient.listFiles()
to get a list FTPFile objects for each directories/files in /Doc
directory in the server and use FTPClientConfig object to configure
the FTPClient as follow:

serverTimeZoneId = "Asia/Hong Kong"
defaultDateFormatStr = "MMM d yyyy"
recentDateFormatStr = "MMM d HH:mm"

If the file/directory date falls between "Feb 29 00:00" and "Feb 29
23:59", the FTPFile object is "NULL". If the file/directory date is
"Feb 29 2008", the FTPFile object is created normally.

Then, I download the source code of common-net-1.4.1 Java package and
found that FTPTimestampParserImpl.parseTimestamp() throws
ParseException.

How can I solve this problem?

-- 
Kathy Lo

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [ftp] Fail to create FTPFile object on some directories/files when calling listFiles()

Posted by James Carman <ja...@carmanconsulting.com>.
On 3/5/08, sebb <se...@gmail.com> wrote:
> On 05/03/2008, James Carman <ja...@carmanconsulting.com> wrote:
>  > Look familiar?
>  >
>  >  https://issues.apache.org/jira/browse/NET-188
>  >
>  >  I'd keep an eye on that JIRA issue.  Apparently a lot of folks just
>  >  ran into this for some reason. :)  The good news is we've got 4 years
>  >  to fix it! :)
>  >
>
>
> Not so: we'll have 3.5 years to fix it once the date is 6 months after Feb 29.
>
>  *nix systems will contine to omit the year from Feb 29 until 6 months
>  have passed, so files with that date will continue to cause problems
>  until then.

YUCK!

>
>
>  >
>  >
>  >  On 3/5/08, Kathy Lo <ka...@gmail.com> wrote:
>  >  > Dear all,
>  >  >
>  >  >  In server-side, it uses vsftpd 2.0.3 as FTP Server. In client-side, it
>  >  >  uses common-net-1.4.1 Java package to communicate with FTP Server
>  >  >  through Java program. Both the server and client are running Linux FC
>  >  >  4
>  >  >
>  >  >  In client side, I wrote a Java program to call FTPClient.listFiles()
>  >  >  to get a list FTPFile objects for each directories/files in /Doc
>  >  >  directory in the server and use FTPClientConfig object to configure
>  >  >  the FTPClient as follow:
>  >  >
>  >  >  serverTimeZoneId = "Asia/Hong Kong"
>  >  >  defaultDateFormatStr = "MMM d yyyy"
>  >  >  recentDateFormatStr = "MMM d HH:mm"
>  >  >
>  >  >  If the file/directory date falls between "Feb 29 00:00" and "Feb 29
>  >  >  23:59", the FTPFile object is "NULL". If the file/directory date is
>  >  >  "Feb 29 2008", the FTPFile object is created normally.
>  >  >
>  >  >  Then, I download the source code of common-net-1.4.1 Java package and
>  >  >  found that FTPTimestampParserImpl.parseTimestamp() throws
>  >  >  ParseException.
>  >  >
>  >  >  How can I solve this problem?
>  >  >
>  >  >
>  >  >  --
>  >  >  Kathy Lo
>  >  >
>  >  >  ---------------------------------------------------------------------
>  >  >  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  >  >  For additional commands, e-mail: user-help@commons.apache.org
>  >  >
>  >  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  >  For additional commands, e-mail: user-help@commons.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [ftp] Fail to create FTPFile object on some directories/files when calling listFiles()

Posted by sebb <se...@gmail.com>.
On 05/03/2008, James Carman <ja...@carmanconsulting.com> wrote:
> Look familiar?
>
>  https://issues.apache.org/jira/browse/NET-188
>
>  I'd keep an eye on that JIRA issue.  Apparently a lot of folks just
>  ran into this for some reason. :)  The good news is we've got 4 years
>  to fix it! :)
>

Not so: we'll have 3.5 years to fix it once the date is 6 months after Feb 29.

*nix systems will contine to omit the year from Feb 29 until 6 months
have passed, so files with that date will continue to cause problems
until then.

>
>
>  On 3/5/08, Kathy Lo <ka...@gmail.com> wrote:
>  > Dear all,
>  >
>  >  In server-side, it uses vsftpd 2.0.3 as FTP Server. In client-side, it
>  >  uses common-net-1.4.1 Java package to communicate with FTP Server
>  >  through Java program. Both the server and client are running Linux FC
>  >  4
>  >
>  >  In client side, I wrote a Java program to call FTPClient.listFiles()
>  >  to get a list FTPFile objects for each directories/files in /Doc
>  >  directory in the server and use FTPClientConfig object to configure
>  >  the FTPClient as follow:
>  >
>  >  serverTimeZoneId = "Asia/Hong Kong"
>  >  defaultDateFormatStr = "MMM d yyyy"
>  >  recentDateFormatStr = "MMM d HH:mm"
>  >
>  >  If the file/directory date falls between "Feb 29 00:00" and "Feb 29
>  >  23:59", the FTPFile object is "NULL". If the file/directory date is
>  >  "Feb 29 2008", the FTPFile object is created normally.
>  >
>  >  Then, I download the source code of common-net-1.4.1 Java package and
>  >  found that FTPTimestampParserImpl.parseTimestamp() throws
>  >  ParseException.
>  >
>  >  How can I solve this problem?
>  >
>  >
>  >  --
>  >  Kathy Lo
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  >  For additional commands, e-mail: user-help@commons.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [ftp] Fail to create FTPFile object on some directories/files when calling listFiles()

Posted by James Carman <ja...@carmanconsulting.com>.
Look familiar?

https://issues.apache.org/jira/browse/NET-188

I'd keep an eye on that JIRA issue.  Apparently a lot of folks just
ran into this for some reason. :)  The good news is we've got 4 years
to fix it! :)



On 3/5/08, Kathy Lo <ka...@gmail.com> wrote:
> Dear all,
>
>  In server-side, it uses vsftpd 2.0.3 as FTP Server. In client-side, it
>  uses common-net-1.4.1 Java package to communicate with FTP Server
>  through Java program. Both the server and client are running Linux FC
>  4
>
>  In client side, I wrote a Java program to call FTPClient.listFiles()
>  to get a list FTPFile objects for each directories/files in /Doc
>  directory in the server and use FTPClientConfig object to configure
>  the FTPClient as follow:
>
>  serverTimeZoneId = "Asia/Hong Kong"
>  defaultDateFormatStr = "MMM d yyyy"
>  recentDateFormatStr = "MMM d HH:mm"
>
>  If the file/directory date falls between "Feb 29 00:00" and "Feb 29
>  23:59", the FTPFile object is "NULL". If the file/directory date is
>  "Feb 29 2008", the FTPFile object is created normally.
>
>  Then, I download the source code of common-net-1.4.1 Java package and
>  found that FTPTimestampParserImpl.parseTimestamp() throws
>  ParseException.
>
>  How can I solve this problem?
>
>
>  --
>  Kathy Lo
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org