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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to