Ok, I figured this out. It was a subtle timing problem stemming from the fact that I run the FTP actions on separate threads. A second operation was being initiated before the storeFile was complete :-(
Everything is working fine now. Thanks. -----Original Message----- From: Larry Streepy [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 4:01 PM To: [email protected] Subject: [net] "truncated server reply" on FTPClient.storeFile 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 FTP.java:274. 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); localStream.close(); TIA. _______________________________________________ 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 www.flagshiphealthcare.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
