commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ravi shankar" <ravi2...@gmail.com>
Subject Commons FTP problem 500 [122] CDataBuffer::Write Error, Buffer Too Small
Date Tue, 19 Feb 2008 18:03:21 GMT
Hi,

I am using commons-net 1.1 version for pulling files from external
server which is behind a firewall.
I am using the following code.

                       outputFile = new FileOutputStream(localFileName);
                        // store the file on remote machine
                        //ftp is the FTPClient object
                        boolean isTransferred =
ftp.retrieveFile(remoteFileName, outputFile);
                        if (!isTransferred)
                        {
                                throw new Exception("Not able to get
the files FTP server " +
ftp.getReplyString() + " :: " + ftp.getReplyCode());
                        }

I am not doing a ftp.listFiles() since listFiles() wouldnt work if the
external FTP server type is 'UNKNOWN'. I know which file to get so
trying to directly get the file.
When I run the above code I get the following exception message with
replyString :: replyCode as the retrieval fails.

500 [122] CDataBuffer :: Write Error, Buffer Too Small: Len=39424, Buffer=16384

Can anybody please help me in resolving this issue? Whats the most
generic way to handle this as listFiles() doesnt work
Can this be related to a Firewall issue? because second time when I
try to pull the same file I receive '550 *** ERROR *** NO BATCHES FOR
TRANSMISSION' though the file is present is updated with a flag
indicating that its processing.

Thanks in advance,
Ravi

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message