commons-net

Using FTP Proxy with apache commons-net

I want to set up an FTP connection using a proxy server with Apache's commons-net. But looking at this Does FTPClient support FTP connections through an FTP proxy server? has me worried. I have to meddle with the system properties and the Sun docs state that "If socksProxyHost is specified then all TCP sockets will use the SOCKS proxy ...

Detect or prevent Commons Net FTPClient from blocking on read.

I'm using the Commons Net FTPClient class to periodically poll an ftp site and attempt to download a file. Occasionally the thread is blocking indefinitely when trying to read from the site and I wondered if anyone else had encountered this problem and could offer any workarounds? I'm using FTPClient's retrieveFileStream(String) method...

Ant telnet is hanging on a simple task

<?xml version="1.0" ?> <project name="test" default="root"> <target name="telnet"> <telnet server="10.1.1.1"> <read>login:</read> <write>root</write> <read>password:</read> <write>${PASSWORD}</write> <read>#</read> <write>ls</write> <read>#</r...

ant ftp doesn't download files in subdirectories

Hello, I'm trying to download files in subdirectories from an ftp server with ant. The exact set of files is known. Some of them are in subdirectories. Ant only seems to download the ones in the root directory. It does work if I download all files without listing them. The first ftp action should do the exact same thing as the second. ...

Transfer raw binary with apache commons-net FTPClient?

UPDATE: Solved I was calling FTPClient.setFileType() before I logged in, causing the FTP server to use the default mode (ASCII) no matter what I set it to. The client, on the other hand, was behaving as though the file type had been properly set. BINARY mode is now working exactly as desired, transporting the file byte-for-byte in all c...

commons-net ftp is uploading corrupted files

Hi all, I'm trying to use apache commons-net for ftp file transfers. Problem is files are intermittently arriving at the server corrupt. by 'corrupt' i mean that winrar tells me a zip file has an 'Unexpected end of archive'. sometimes the files are completely empty. I have noticed that this happens more for larger files (100kb+), howev...

FTP connection "hangs" on "LIST"

All, I have an issue with a remote ftp server that has kept me busy for three days now and I am going nuts over it. :( A while ago, I wrote a simple ftp retriever class that uses apache commons-net 2.0. The class works fine on 5 different ftp servers, I can retrieve data as I want. Now I have come across a server that I need to connect...

commons net ftp issue

I am facing an issue where it appears that my FTP connection is correct and no errors are received, but the file is not placed on the ftp server. I am using commons-net-ftp. Code: int retCode = 0; FTPClient client = new FTPClient(); client.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)...

Upload file via Ant FTP task in Maven

I'm trying to upload a file using an Ant task. If I use Ant directly the file is uploaded, but if I call the ant task via Maven (using the maven-antrun-plugin) I get the following error: An Ant BuildException has occured: The following error occurred while executing this line: /home/me/proj/build.xml:15: Problem: failed to create task ...