[
https://issues.apache.org/jira/browse/NET-553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14243541#comment-14243541
]
Sebb commented on NET-553:
--------------------------
Most likely cause is a problem with parsing the response listing.
Response lines that are not recognised are ignored by default.
To fix the parsing would require examples that don't work, together with the
system type.
There are a couple of ways to get the raw listing.
Add a ProtocolCommandListener.
Alternatively, the latest version of the code (not yet released) has a new
method:
FTPClientConfig.setUnparseableEntries(boolean saveUnparseable)
If set to true, then unparseable entries are stored as FTPFile entries; the
original entry can be obtained using the getRawListing() method.
The isValid() method returns true if the entry was parsed OK.
The FTPClientExample has been updated to support a -U flag.
So for example one could try:
java -jar commons-net-examples-3.4-SNAPSHOT.jar FTPClientExample -A -l -U
hostname [path]
> listFiles(String) returns an empty list, even though FTP Server has sent back
> data
> ----------------------------------------------------------------------------------
>
> Key: NET-553
> URL: https://issues.apache.org/jira/browse/NET-553
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 2.0, 3.3
> Environment: AIX
> Reporter: Paul Titheridge
>
> We've been using the Apache Commons 2.0 and 3.3 library for a while now, and
> have just run into an issue.
> The FTP client application and the FTP Server are running on different AIX
> systems.
> When the FTP application calls the:
> FTPClient.listFiles(String)
> command to get some information about a file stored on the FTP Server, the
> method intermittently returns an array containing no elements. However,
> looking at documentation from both the FTP Server and the network, it can be
> seen that the FTP Server is actually sending back what appears to be a valid
> response to the LIST command issued by FTPClient.listFiles(String).
> The response sent by the FTP Server contains the file name and attribute
> information, which is what we expect to see. For some reason, that
> information is not returned back to the application by the
> FTPClient.listFiles(String) method.
> The problem only seems to occur under load.
> Has anyone seen this before, or have any suggestions as to what might be
> causing it?
> Thanks in advance
> Paul
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)