Hi.

I can't get vfs to write a file to my FTP server.

The error:

"org.apache.commons.vfs.FileSystemException: Could not determine if 
file "ftp://username:[EMAIL PROTECTED]/xxxsomething.zip" is writeable."

The code:

String ftpAddress = "ftp://username:[EMAIL PROTECTED]/";
try {
    tmpRemFile = VFS.getManager().resolveFile(
        ftpAddress + "xxx" + zipFile.getName());
    if (!tmpRemFile.exists())
        tmpRemFile.createFile();
        .........
} catch (Exception e) {
    gui.showListWarning(e.getLocalizedMessage() + "\n" + e.getCause());
        e.printStackTrace();
    return false;
}

tmpRemFile is a FileObject, but it's imaginary (doesn't exist on the server). 
The exception is thrown after executing "tmpRemFile.createFile();"

I've noticed that if the file is already on the server, the exception isn't 
thrown. Doing anything else with the file (rename, delete) still raises the 
exception.

I've tried this with two different FTP servers and several recent nightlies. 
I've got all the dependencies necessary, I think (logging, net, oro). I can, 
of course, log in and write a file to the server with any standalone client.

What am I doing wrong?

Thanks,
Tro

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to