commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbre...@wi.rr.com (Jeffrey D. Brekke)
Subject Re: R: R: Disconnect in FTPClient not working under 1.2.2
Date Tue, 28 Oct 2003 17:52:38 GMT
After talking here we remember having that issue with older jre's but
new ones don't seem to have the same issues with calling close()
without logging out.  We can't remember the reason though ( if we ever
discovered it at all ).

>>>>> On Tue, 28 Oct 2003 15:17:42 +0100, Leonardo Francalanci <lfrancalanci@simtel.ie>
said:

> Ok, calling logout() before close() works.  Without the logout call
> it hangs in: close() in TelnetInputStream (in the super.close()
> call) and not in the TelnetClient as I said before.

> The code is:

> 		FTPClient ftp = new FTPClient(); try { int reply;
> ftp.connect(ipAddress); ftp.enterLocalPassiveMode(); reply =
> ftp.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) {
> ftp.disconnect(); return;
> 			}

> 			if (!ftp.login(user, password)) {
> ftp.disconnect(); return;
> 			}

> 		} catch (IOException e) { } finally { if
> (ftp.isConnected()) { /*try { ftp.logout(); } catch (IOException e)
> { } finally {*/ try { ftp.disconnect(); } catch (IOException f) {
> 					}
> 				//}
> 			}

> 		}

> (I removed all my business code, I ran the app but it still doesn't
> work).  As you see, it is just a connect with a login (that works)
> and a disconnect.  If I un-comment the finally into this (logout
> before disconnect) it works:

> 		} finally { if (ftp.isConnected()) { try {
> ftp.logout(); } catch (IOException e) { } finally { try {
> ftp.disconnect(); } catch (IOException f) {
> 					}
> 				}
> 			}

> 		}


>> -----Messaggio originale----- Da: Jeffrey D. Brekke
>> [mailto:jbrekke@wi.rr.com] Inviato: martedi 28 ottobre 2003 14.48
>> A: Jakarta Commons Users List Oggetto: Re: R: Disconnect in
>> FTPClient not working under 1.2.2
>> 
>> 
>> 
>> Not sure then.  Maybe there is an issue with your code.  Could you
>> post some of the code you're having problems with?  Sometimes
>> completePendingCommand() needs to be issued and we used to have
>> hangs when we would close() before logout(), but not lately.  You
>> could check those things.
>> 
>> 
>> >>>>> On Tue, 28 Oct 2003 14:42:03 +0100, Leonardo Francalanci
>> <lfrancalanci@simtel.ie> said:
>> 
>> > I've already tried, but it doesn't work!  It hangs in the close
>> of > org.apache.commons.net.telnet.TelnetClient when it calls >
>> super.close().
>> 
>> 
>> 
>> >> -----Messaggio originale----- Da: Jeffrey D. Brekke >>
>> [mailto:jbrekke@wi.rr.com] Inviato: martedi 28 ottobre 2003 14.11
>> >> A: Jakarta Commons Users List Oggetto: Re: Disconnect in
>> FTPClient >> not working under 1.2.2
>> >>
>> >>
>> >>
>> >> I built the current release with 1.4.2, I wasn't even thinking
>> >> about jre version, sorry.  I don't believe we've introduced any
>> >> dependency on newer jre's into the code base, so it may be that
>> we >> just need to rebuild with an older jdk.
>> >>
>> >> I don't have 1.2.2 jdk available immediately so unless someone
>> >> beats me too it, I can try to build a 1.2.2 compatible release
>> this >> weekend.
>> >>
>> >> Would you be willing to get the source dist and attempt a
>> recompile >> and see if that works?
>> >>
>> >> >>>>> On Tue, 28 Oct 2003 13:39:07 +0100, Leonardo Francalanci
>> >> <lfrancalanci@simtel.ie> said:
>> >>
>> >> > Is there a minimum requirement for the JRE to use the
>> Commons/net >> > package?  My FTPClient hangs on the disconnect()
>> method if used > >> under 1.2.2. (Works fine under 1.4.2).
>> >>
>> >>
>> >> >
>> >>
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: >>
>> commons-user-unsubscribe@jakarta.apache.org > For additional >>
>> commands, e-mail: > commons-user-help@jakarta.apache.org
>> >>
>> >> -- >>
>> =====================================================================
>> >> Jeffrey D. Brekke jbrekke@wi.rr.com Wisconsin, USA >>
>> brekke@apache.org ekkerbj@yahoo.com
>> >>
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail:
>> commons-user-unsubscribe@jakarta.apache.org >> For additional
>> commands, e-mail: >> commons-user-help@jakarta.apache.org
>> >>
>> >>
>> 
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> commons-user-unsubscribe@jakarta.apache.org > For additional
>> commands, e-mail: > commons-user-help@jakarta.apache.org
>> 
>> --
>> =====================================================================
>> Jeffrey D. Brekke jbrekke@wi.rr.com Wisconsin, USA
>> brekke@apache.org ekkerbj@yahoo.com
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> commons-user-help@jakarta.apache.org
>> 
>> 


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

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                    ekkerbj@yahoo.com


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


Mime
View raw message