commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jessica King" <>
Subject [NET] Connection Reset Error (but works when debugging)
Date Mon, 27 Mar 2006 14:54:51 GMT
I have a very strange problem (or at least it seems to me). I have a class
that needs to download a file via FTP. The code works perfectly while I'm
debugging. I don't even step into the methods below, I just step over each
one to watch variables and see what it's doing. However, when I just run the
program, not in debug mode, I get a connection reset error every time;
debugging works without fail and running fails - never working.


Any ideas as to what the problem is? I've also tried opening up some desktop
clients, just to make sure the FTP server is ok, and those work fine.



Here's the code:

ftp = new FTPClient();

ftp.enterLocalPassiveMode() <ftp://ftp.enterlocalpassivemode()/> ; //I've
tried the code with and without this


ftp.login(username, password);


            File outputFile = new File(destinationFolder + "\\" +

            if (outputFile.exists()) {




            FileOutputStream fos = new FileOutputStream(outputFile);

            ftp.retrieveFile(dbFileName, fos);


            ftp.disconnect() <ftp://ftp.disconnect()/> ;


Any help or suggestions would be greatly appreciated.

Jessica King
Client/Server Programmer


Manufacturing Performance Services, LLC
--A phelon Company--
895 University Parkway
Aiken, SC 29802


The contents of this email and any attachments are confidential.
They are intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or  the 
sender immediately and do not disclose the contents to anyone or make copies.

** eSafe scanned this email for viruses, vandals and malicious content. **
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message