commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Streepy" <>
Subject [net] "truncated server reply" on FTPClient.storeFile
Date Thu, 21 Jul 2005 20:01:20 GMT
I'm using version 1.4.

Every time I try to use the storeFile method, I get a MalformedServerReplyException with the
message "Truncated server reply:" at line  I have tried to send a file to 4
different servers and I get the same error every time.  I have searched all the archives I
can find, and I find no mention of a problem like this.

Any ideas?

I'm assuming it's something on my (client) end since it occurs on every server I try.  Further,
trying a command line ftp utility and 'put'ting a file works just fine.

The code I'm trying is identical to the various samples I've seen on the net, here's the fragment
in question (note that the connection is working since I can list and get files, I just can't
send them):

    FTPClient ftp = getFtpConnection();

    // Open a stream to read the file
    File localFile = new File(localDir, fileName);
    InputStream localStream = new FileInputStream(localFile);

    // Send the file
    _ftpResults.setOperation("PUT: " + fileName + " --> " + _config.getServerName());
    ftp.storeFile(fileName, localStream);


Larry V. Streepy
Vice President and CIO
Flagship Healthcare Management, Inc.
432 Park Avenue South, 13th Floor, New York, NY 10016
(O) 212-340-9160    (F) 212-340-9101

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message