commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bogdan Drozdowski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (NET-342) Calling retrieveFileStream(fileName) before listFiles() causes ParserInitializationException
Date Mon, 07 Feb 2011 16:59:57 GMT

    [ https://issues.apache.org/jira/browse/NET-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991468#comment-12991468
] 

Bogdan Drozdowski commented on NET-342:
---------------------------------------

This is the way it should be. You have not read the documentation and you haven't called client.completePendingCommand()
after the file transfer. This didn't flush the server replies and messed up the server reply
queue in the client.

> Calling retrieveFileStream(fileName) before listFiles() causes ParserInitializationException
> --------------------------------------------------------------------------------------------
>
>                 Key: NET-342
>                 URL: https://issues.apache.org/jira/browse/NET-342
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 2.0
>            Reporter: L K
>
> When calling FtpClient.retrieveFileStream(fileName) before FtpClient.listFiles() an org.apache.commons.net.ftp.parser.ParserInitializationException
is thrown, giving the message: Unknown parser type: [last console output]
> Works:
> FTPFile[] ftpFiles = client.listFiles();
> InputStream is = client.retrieveFileStream("./test.txt");
> Works:
> client.pwd();
> FTPFile[] ftpFiles = client.listFiles();
> InputStream is = client.retrieveFileStream("./test.txt");
> Does not work:
> InputStream is = client.retrieveFileStream("./test.txt");
> client.pwd();
> FTPFile[] ftpFiles = client.listFiles();
> Output:
> org.apache.commons.net.ftp.parser.ParserInitializationException: Unknown parser type:
"/" is the current directory

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message