Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 24260 invoked from network); 28 Oct 2003 18:06:13 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 28 Oct 2003 18:06:13 -0000 Received: (qmail 99146 invoked by uid 500); 28 Oct 2003 18:05:53 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 99059 invoked by uid 500); 28 Oct 2003 18:05:52 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 98736 invoked from network); 28 Oct 2003 18:05:47 -0000 Received: from unknown (HELO ms-smtp-01.rdc-kc.rr.com) (24.94.166.115) by daedalus.apache.org with SMTP; 28 Oct 2003 18:05:47 -0000 Received: from firefoot (CPE-24-211-19-232.wi.rr.com [24.211.19.232]) by ms-smtp-01.rdc-kc.rr.com (8.12.10/8.12.7) with ESMTP id h9SI5jLU004466 for ; Tue, 28 Oct 2003 12:05:49 -0600 (CST) Received: from jbrekke by firefoot with local (Exim 3.36 #1 (Debian)) id 1AEY1H-0004dx-00 for ; Tue, 28 Oct 2003 11:52:39 -0600 To: Jakarta Commons Users List Subject: Re: R: R: Disconnect in FTPClient not working under 1.2.2 References: From: jbrekke@wi.rr.com (Jeffrey D. Brekke) Date: Tue, 28 Oct 2003 11:52:38 -0600 In-Reply-To: (Leonardo Francalanci's message of "Tue, 28 Oct 2003 15:17:42 +0100") Message-ID: <85oew16yhl.fsf@brekke.org> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 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 >> 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 >> >> 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