I am writing an FTP application using org.apache.commons.net. I am able to connect and disconnect with my server. As a start up, I am trying to print the list of files in the specified directory.(As later on I want to check whether the file is directory or not) But it gave me bunch of exception although it compiled well. Here is my code:
java.lang.NoClassDefFoundError: org/apache/oro/text/regex/MalformedPatternException at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createUnixFTPEntryParser(DefaultFTPFileEntryParserFactory.java:121) at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:84) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2306) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2055) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2106) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2146) at MyFTP.main(MyFTP.java:23) Exception in thread "main"
I dont know how to proceed. All I need to do is download a file from a specified directory in binary mode. That is my goal. But before that I tried to see whether I am able to get the files/directory listing from a specified directory. Pls help/suggest me If I am doing anything wrong.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Problem with my FTP client Program: MalformedPatternException