You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "keming.hu (Created) (JIRA)" <ji...@apache.org> on 2012/02/29 12:55:57 UTC

[jira] [Created] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
-----------------------------------------------------------------------------------------------------

                 Key: NET-445
                 URL: https://issues.apache.org/jira/browse/NET-445
             Project: Commons Net
          Issue Type: Bug
          Components: FTP
    Affects Versions: 3.0.1
            Reporter: keming.hu
             Fix For: 3.1, 3.0.1


Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "George Sanchez (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223634#comment-13223634 ] 

George Sanchez commented on NET-445:
------------------------------------

Just encountered this in production using version commons-net.1.4.1.jar Is this being addressed on the latest release ?
Thanks!
                
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "keming.hu (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235299#comment-13235299 ] 

keming.hu commented on NET-445:
-------------------------------

In my project, I make sure to use commons-net-3.0.1.jar. For these files which were uploaded to FTP server in Feb,29 2012,the method of listFiles can obtain these files in the jar package
                
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "Danilo Seki (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219371#comment-13219371 ] 

Danilo Seki commented on NET-445:
---------------------------------

We had this problem today. I used the code from NET-188 and found out that the problem exists on versions 1.4.0 and 1.4.1. Checked versions 1.3.0, 2.0, 3.0 and 3.0.1 and the problem did not happen.

Initially we suspected the version packaged in the application (1.3.0) but latter we found out the application server used version 1.4.1 and that it was being used before in the classpath. Make sure you are using the version you packaged.

Btw, I tested different JVM's: Sun 1.5, Sun 1.6 and BEA 1.5.
                
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>             Fix For: 3.0.1, 3.1
>
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "Sebb (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219204#comment-13219204 ] 

Sebb edited comment on NET-445 at 3/6/12 9:02 PM:
--------------------------------------------------

NET uses SimpleDateFormat to parse short dates; however this does not work properly for Feb 29.
The current work-round fails for leap-years.

[Later] the problem with SimpleDateFormat is that it assumes the year is 1970 - which was not a leap year.
The workround is to append the current year to the short date before parsing.
This works fine if the current year is a leap year, as is true of 2012.
However, if the ftp server continues to display short dates after the end of 2012, the work-round will fail at the start of 2013.
Many ftp servers only display short dates for +/- 6 months; such servers will switch to long format dates for Feb 29 before the end of 2012, so won't be affected.
                
      was (Author: sebb@apache.org):
    NET uses SimpleDateFormat to parse short dates; however this does not work properly for Feb 29.
The current work-round fails for leap-years.

Hope to have a fix soon.
                  
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved NET-445.
----------------------

       Resolution: Fixed
    Fix Version/s: 3.1
    
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>             Fix For: 3.1
>
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219379#comment-13219379 ] 

Sebb commented on NET-445:
--------------------------

Note: the example ftp class can be used to test as follows:

{code}
set CLASSPATH=commons-net-examples-3.1.jar;commons-net-3.1.jar
java examples/ftp/FTPClientExample -l host[:port] username password [directory]
{code}
                
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219204#comment-13219204 ] 

Sebb commented on NET-445:
--------------------------

NET uses SimpleDateFormat to parse short dates; however this does not work properly for Feb 29.
The current work-round fails for leap-years.

Hope to have a fix soon.
                
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>             Fix For: 3.0.1, 3.1
>
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223647#comment-13223647 ] 

Sebb commented on NET-445:
--------------------------

Have you tried 3.1?

I think the problem mentioned in my earlier comment only applies when the server date is not a leap year.
This is confirmed by the comment from Danilo.
                
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "Sebb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-445:
---------------------

    Fix Version/s:     (was: 3.1)
                       (was: 3.0.1)
    
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NET-445) The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219244#comment-13219244 ] 

Sebb commented on NET-445:
--------------------------

Snapshots are regularly published - no guarantees!

https://repository.apache.org/content/groups/snapshots/commons-net/commons-net/3.2-SNAPSHOT/

It might be worth trying the latest one - commons-net-3.2-20120229.013133-18 - as some fixes were made recently that relate to leap year issues.
                
> The method listFiles in FTPClient can not list these files which upload to FTP Server in Feb, 29 2012
> -----------------------------------------------------------------------------------------------------
>
>                 Key: NET-445
>                 URL: https://issues.apache.org/jira/browse/NET-445
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: keming.hu
>             Fix For: 3.0.1, 3.1
>
>
> Before Feb, 29 2012, the method listFiles() in FTPClient.class can list all files in FTP Server. But today, for any file which be uploaded to FTP Server in Feb, 29 2012, this API can not list these files. When I change the date of FTP Server(it is not Feb, 29 2012), this API can list all files in FTP Server also. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira