Greetings,
Has anybody used the Apache Commons api for FTP?
I am trying to get a list of files on a unix box via ftp and by this simple method:
FTPClient ftp = new FTPClient();
try{
ftp.connect(server);
ftp.login(userId, password);
FTPFile[] files = ftp.listFiles(folder);
} catch(Exception e) {
e.printStackTrace();
}
and I get the following error when I perform the listFiles method.
Does anybody know what is going on?
Thanks in advance
Steerforth
java.lang.NoClassDefFoundError: org.apache.commons.net.ftp.parser.UnixFTPEntryParser
org.apache.commons.net.ftp.FTPFileEntryParser org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createUnixFTPEntryParser()
DefaultFTPFileEntryParserFactory.java:169
org.apache.commons.net.ftp.FTPFileEntryParser org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(java.lang.String)
DefaultFTPFileEntryParserFactory.java:94
org.apache.commons.net.ftp.FTPListParseEngine org.apache.commons.net.ftp.FTPClient.initiateListParsing(java.lang.String, java.lang.String) FTPClient.java:2358
org.apache.commons.net.ftp.FTPFile[] org.apache.commons.net.ftp.FTPClient.listFiles(java.lang.String)
FTPClient.java:2141
void com.ceas.Utilities.ArchiveLogFiles.doFTP(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
ArchiveLogFiles.java:450
void com.ceas.Utilities.ArchiveLogFiles.main(java.lang.String[])
ArchiveLogFiles.java:458
Exception in thread main
Has anybody used the Apache Commons api for FTP?
I am trying to get a list of files on a unix box via ftp and by this simple method:
FTPClient ftp = new FTPClient();
try{
ftp.connect(server);
ftp.login(userId, password);
FTPFile[] files = ftp.listFiles(folder);
} catch(Exception e) {
e.printStackTrace();
}
and I get the following error when I perform the listFiles method.
Does anybody know what is going on?
Thanks in advance
Steerforth
java.lang.NoClassDefFoundError: org.apache.commons.net.ftp.parser.UnixFTPEntryParser
org.apache.commons.net.ftp.FTPFileEntryParser org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createUnixFTPEntryParser()
DefaultFTPFileEntryParserFactory.java:169
org.apache.commons.net.ftp.FTPFileEntryParser org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(java.lang.String)
DefaultFTPFileEntryParserFactory.java:94
org.apache.commons.net.ftp.FTPListParseEngine org.apache.commons.net.ftp.FTPClient.initiateListParsing(java.lang.String, java.lang.String) FTPClient.java:2358
org.apache.commons.net.ftp.FTPFile[] org.apache.commons.net.ftp.FTPClient.listFiles(java.lang.String)
FTPClient.java:2141
void com.ceas.Utilities.ArchiveLogFiles.doFTP(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
ArchiveLogFiles.java:450
void com.ceas.Utilities.ArchiveLogFiles.main(java.lang.String[])
ArchiveLogFiles.java:458
Exception in thread main