commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cole" <sc...@camsbycbs.com>
Subject Re: Connection Reset Error with Commons FTP
Date Wed, 23 Dec 2009 13:38:29 GMT
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" <sathish_gs@rediffmail.com>
To: <user@commons.apache.org>
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: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>


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


Mime
View raw message