{"id":642,"date":"2004-11-08T07:55:15","date_gmt":"2004-11-08T11:55:15","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=642"},"modified":"2004-11-08T07:55:15","modified_gmt":"2004-11-08T11:55:15","slug":"commons-net-ftp-listfiles-returns-null","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2004\/11\/08\/commons-net-ftp-listfiles-returns-null\/","title":{"rendered":"Commons Net FTP listFiles() returns null"},"content":{"rendered":"<p>Just bringing this to the top of the Google Queue<sup>TM<\/sup>, if you&#8217;re using the listFiles() method of the <a href=\"http:\/\/jakarta.apache.org\/commons\/net\/apidocs\/org\/apache\/commons\/net\/ftp\/class-use\/FTPFile.html#org.apache.commons.net.ftp.parser\">org.apache.commons.net.ftp.FTPFile<\/a> class and you&#8217;re seeing that <a href=\"http:\/\/jakarta.apache.org\/commons\/net\/apidocs\/org\/apache\/commons\/net\/ftp\/FTPClient.html#listFiles()\">listFiles()<\/a> returns <code>null<\/code> when it shouldn&#8217;t be, make sure to upgrade to the latest and greatest version of commons-net (which is 1.2.2 right now).  Using version 1.0.0 was causing NPE&#8217;s all over the place.  I think this <a href=\"http:\/\/issues.apache.org\/bugzilla\/show_bug.cgi?id=30737\">bug<\/a> on issues.apache.org discusses the issue, but it&#8217;s more specific than what I was seeing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just bringing this to the top of the Google QueueTM, if you&#8217;re using the listFiles() method of the org.apache.commons.net.ftp.FTPFile class and you&#8217;re seeing that listFiles() returns null when it shouldn&#8217;t be, make sure to upgrade to the latest and greatest version of commons-net (which is 1.2.2 right now). Using version 1.0.0 was causing NPE&#8217;s all &hellip; <a href=\"https:\/\/cephas.net\/blog\/2004\/11\/08\/commons-net-ftp-listfiles-returns-null\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Commons Net FTP listFiles() returns null<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/642"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=642"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/642\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}