Apache's FTPClient class, anyone?

Discussion in 'Java' started by Mikhail Teterin, Feb 11, 2008.

  1. Hello!

    We are trying to use Apache's FTPClient class

    http://commons.apache.org/net/api/org/apache/commons/net/ftp/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
    Mikhail Teterin, Feb 11, 2008
    #1
    1. Advertising

  2. Mikhail Teterin

    Roedy Green Guest

    On Mon, 11 Feb 2008 15:47:00 -0500, Mikhail Teterin
    <> 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
    Roedy Green, Feb 11, 2008
    #2
    1. Advertising

  3. Marcelo Morales, Feb 12, 2008
    #3
  4. Mikhail Teterin

    Daniel Pitts Guest

    Daniel Pitts, Feb 12, 2008
    #4
  5. Mikhail Teterin

    symphonyx

    Joined:
    Feb 19, 2009
    Messages:
    1
    org.apache.commons.net.ftp.FTPClient

    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(SecureClassLoader.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.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.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();
    }
    }
    }
    symphonyx, Feb 19, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neeraj Vibhasrao Kulkarni

    sun.net.ftp.FtpClient

    Neeraj Vibhasrao Kulkarni, Nov 15, 2004, in forum: Java
    Replies:
    1
    Views:
    14,392
    A. Bolmarcich
    Nov 15, 2004
  2. Barbara Vernaeve

    FTPClient slow on laptops

    Barbara Vernaeve, Nov 18, 2004, in forum: Java
    Replies:
    0
    Views:
    598
    Barbara Vernaeve
    Nov 18, 2004
  3. Pradeep

    FTPClient Help

    Pradeep, Aug 16, 2006, in forum: Java
    Replies:
    2
    Views:
    529
  4. Christopher Benson-Manica

    Apache commons net 1.4.1 FTPClient reliability

    Christopher Benson-Manica, Sep 20, 2007, in forum: Java
    Replies:
    0
    Views:
    502
    Christopher Benson-Manica
    Sep 20, 2007
  5. Bricker,  M.

    apache FTPClient

    Bricker, M., Feb 12, 2009, in forum: Java
    Replies:
    2
    Views:
    1,881
    Arne Vajhøj
    Feb 13, 2009
Loading...

Share This Page