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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to