Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Apache's FTPClient class, anyone?

Reply
Thread Tools

Apache's FTPClient class, anyone?

 
 
Mikhail Teterin
Guest
Posts: n/a
 
      02-11-2008
Hello!

We are trying to use Apache's FTPClient class

http://commons.apache.org/net/api/or...FTPClient.html

here for a custom program. The program on the first run, but is is supposed
to avoid re-downloading an entire file by only using setRestartOffset().

An attempt to use that method fails -- the retrieveFile() method returns
false. Unfortunately, no exceptions are thrown, and we have no idea, why it
is failing.

The ftp-server does support "reget" -- we tested it with a standard
command-line ftp-client.

Has anyone here used the FTPClient-class? Perhaps, there is a different
implementation with just as liberal a license? Thanks!

-mi
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      02-11-2008
On Mon, 11 Feb 2008 15:47:00 -0500, Mikhail Teterin
<(E-Mail Removed)> wrote, quoted or indirectly quoted
someone who said :

>An attempt to use that method fails -- the retrieveFile() method returns
>false. Unfortunately, no exceptions are thrown, and we have no idea, why it
>is failing.


I suggest you snoop on the packets going back and forth to compare the
one that works with the one that doesn't.

See http://mindprod.com/jgloss/sniffer.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
 
Marcelo Morales
Guest
Posts: n/a
 
      02-12-2008
I wouldn't recommend apache's. But here's an idea.

http://www.google.com/codesearch?q=f...nG=Search+Code

Marcelo Morales
 
Reply With Quote
 
Daniel Pitts
Guest
Posts: n/a
 
      02-12-2008
Marcelo Morales wrote:
> I wouldn't recommend apache's. But here's an idea.
>
> http://www.google.com/codesearch?q=f...nG=Search+Code
>
> Marcelo Morales


Why would you recommend against it?
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
 
Reply With Quote
 
symphonyx symphonyx is offline
Junior Member
Join Date: Feb 2009
Posts: 1
 
      02-19-2009
Although cant help with your question I'm interested in the answer myself but before I even get that far I get the following error:
java.lang.UnsupportedClassVersionError:

org/apache/commons/net/ftp/FTPClient (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :537)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:251)
at java.net.URLClassLoader.access$100(URLClassLoader. java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 89)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 35)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:302)
at uk.utils.FTPConnector.main(FTPConnector.java:42)
Exception in thread "main"

Can any one shed some light on this for me??? my code is just this:

public class FTPConnector {
public static void main(String[] args) {

FTPClient ftp1;

try {
ftp1 = new FTPClient ();
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FTPClient and CopyStreamAdapter stop sometimes Susanne Kaufmann Java 3 06-30-2008 05:31 PM
Apache commons net 1.4.1 FTPClient reliability Christopher Benson-Manica Java 0 09-20-2007 10:04 PM
FTPClient Help Pradeep Java 2 08-26-2006 02:39 PM
FTPClient slow on laptops Barbara Vernaeve Java 0 11-18-2004 05:00 PM
sun.net.ftp.FtpClient Neeraj Vibhasrao Kulkarni Java 1 11-15-2004 10:39 PM



Advertisments