commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabio Cuomo" <mu...@hotmail.com>
Subject Please Help me !! listFiles() return null
Date Wed, 24 Mar 2004 11:16:05 GMT
i use FTP connection under WinXP, using default windows FTP server..for 
now..after it will work under linux system...i've done some debug on code, 
and when i execute

                                    FTPFile[] filelist = ftp.listFiles();

i get a null pointer exception..Stack trace inform me only of null pointer 
exception, other lines tell me where error happens, however i attach it :
java.lang.NullPointerException
	at test.ftp.MainClass.check(MainClass.java:241)
	at test.ftp.MainClass.<init>(MainClass.java:158)
	at test.ftp.MainClass.main(MainClass.java:816)

This is my scenario: i have an application that check into database for a 
value. After this check i establish an FTP connection to localhost FTP after 
the connection and login i get follow reply message :
                       Reply is : 230 User mulp logged in.

As already said i use listNames() function, but it is a bit useful , however 
reply code after listNames() is :
                       Reply is : 226 Transfer complete
after i get list of names in ftp root.

When i execute FTPFile[] filelist = ftp.listFiles(); i get as reply message 
:

                       Reply is : 226 Transfer complete.

it seems all ok but return value is null and then i get a null pointer 
exception while i want to extract information about files.
listFiles() return value is null and not a single entry of FTPFile[].

Please help me i'm in trouble..Any kind of help is granted.

Thanx in advance.
regards mulp

_________________________________________________________________
Filtri antispamming e antivirus per la tua casella di posta 
http://www.msn.it/msn/hotmail


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


Mime
View raw message