What version of Commons Net are you using? Looks like an older one. Try a newer version, either 1.4.1 or 2.0.
----- Original Message ----- From: "Sathish G" <[email protected]> To: <[email protected]> Sent: Wednesday, December 23, 2009 12:58 AM Subject: Connection Reset Error with Commons FTP > > Hi all, > > I'm using Commons FTP to upload file. The API works fine but for some reason > i get the following error occasionally. I have added the error trace and the > code that i use to send the file using FTP. > > What Puzzles me is that the FTP API throws Error but the file is still > copied correctly to the Host. > > Can i just ignore this error or is it that something is wrong. > > try{ > FtpClient ftpClient = ..... > ftpClient.enterLocalPassiveMode(); > ftpClient.storeFile(directoryName + fileName, stream); > }catch(Exception ...){ > .............. > } finally { > disconnect ftp.... > } > > > Stack trace ......... > > Caused by: java.net.SocketException: Connection reset > at > java.net.SocketInputStream.read(SocketInputStream.java:195) > at > java.io.BufferedInputStream.read1(BufferedInputStream.java(Compiled Code)) > at > java.io.BufferedInputStream.read(BufferedInputStream.java(Compiled Code)) > at > java.io.BufferedInputStream.fill(BufferedInputStream.java:200) > at > java.io.BufferedInputStream.read(BufferedInputStream.java(Compiled Code)) > at > org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStream.jav a:114) > at > org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:5 35) > at java.lang.Thread.run(Thread.java:568) > > -- > View this message in context: http://n4.nabble.com/Connection-Reset-Error-with-Commons-FTP-tp977598p977598.html > Sent from the Commons - User mailing list archive at Nabble.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]
