Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 12770 invoked from network); 24 Mar 2004 10:13:05 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Mar 2004 10:13:05 -0000 Received: (qmail 29911 invoked by uid 500); 24 Mar 2004 10:12:35 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 29844 invoked by uid 500); 24 Mar 2004 10:12:35 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 29830 invoked from network); 24 Mar 2004 10:12:34 -0000 Received: from unknown (HELO smtp.ops.co.at) (194.152.182.4) by daedalus.apache.org with SMTP; 24 Mar 2004 10:12:34 -0000 Received: by smtp.ops.co.at (Postfix, from userid 65534) id A4A2823C0AB; Wed, 24 Mar 2004 11:12:46 +0100 (CET) Received: from ops.co.at (ts1.int.ops.co.at [172.27.1.101]) by smtp.ops.co.at (Postfix) with ESMTP id 5B99D23C0A4 for ; Wed, 24 Mar 2004 11:12:43 +0100 (CET) Message-ID: <40615F7C.6040304@ops.co.at> Date: Wed, 24 Mar 2004 11:14:20 +0100 From: Mario Ivankovits User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: de-de, de-at, de, en-us, en MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: [NET] Re: Please Help me !! listFiles() return null References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on smtp.ops.co.at X-Spam-Level: X-Spam-Status: No, hits=0.1 required=5.0 tests=AWL autolearn=ham version=2.61 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 Fabio Cuomo wrote: > i get a null pointer...java.lang.NullPointerException...listFiles() > return null pointer while if i use It would be great if you could post the stacktrace to see where it is thrown. Is it really listFiles() which throws the excpetion? On what operating system do the ftp-server run? I have tried your example and it worked fine with my linux host. If one of the FTPFile Entries are null and this cause your NullPointerException, than this is due to a bug in UnixFtpEntryParser. Currently files with permissions other than "rwx" cause the FTPClient to return null values. I already filed a bug about this (http://issues.apache.org/bugzilla/show_bug.cgi?id=27858) As a workaround you could copy UnixFtpEntryParser and change the regexp + "(((r|-)(w|-)(x|-))((r|-)(w|-)(x|-))((r|-)(w|-)(x|-)))\\s+" to + "(((r|-)(w|-)(x|X|s|S|t|-))((r|-)(w|-)(x|X|s|S|t|-))((r|-)(w|-)(x|X|s|S|t|-)))\\s+" You have to pass this parser to listFiles then. Ciao, Mario --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org