Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache Commons FTP Error

Status
Not open for further replies.

jsulman

Programmer
Jun 14, 2001
85
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top