commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sathish G <sathish...@rediffmail.com>
Subject Connection Reset Error with Commons FTP
Date Wed, 23 Dec 2009 05:58:28 GMT

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.java:114)
                at
org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:535)
                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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message