You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stéphane Rault <ks...@yahoo.fr> on 2005/02/25 10:40:42 UTC
RE : RE : [VFS] Asking for a solution with Zip files
>Caused by : org.apache.commons.vfs.FileSystemException: Could not
>create folder "ftp://name:password@myftpserver/aNewFile" because it
>already exists and is a file.
>
>
Maybe one of your previous tests already created that folder??
--> I want to create a new file at the root of my ftpserver. Surely the
folder exist ! But the ftp provider seems to try to create it again. I don't
understadn why.
And for sure, the ftp provider supports writing :-)
--> that's a good news :-)
--
Stéphane
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE : RE : [VFS] Asking for a solution with Zip files
Posted by Stéphane Rault <ks...@yahoo.fr>.
Here is the result of a dir command
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for file list
drwxr-xr-x 5 web site 152 Feb 17 10:01 .
drwxr-xr-x 5 web site 152 Feb 17 10:01 ..
drwx------ 2 web site 80 Feb 17 10:01 StefTest
drwx------ 3 web site 72 Jan 19 13:32 drivers
-rw-r--r-- 1 web site 457 Jan 19 13:35 index.html
drwxr-xr-x 2 web site 272 Jun 16 2004 photos
226-Transfer complete.
226 Quotas: utilisation de 41 Mo sur les 1024 Mo
ftp : 322 octets reçus en 0,27 secondes à 1,19 Ko/sec.
If you need more info for testting, mail me directly and i will give you my
username and password in private.
-----Message d'origine-----
De : Mario Ivankovits [mailto:mario@ops.co.at]
Envoyé : vendredi 25 février 2005 12:55
À : Jakarta Commons Developers List
Objet : Re: RE : [VFS] Asking for a solution with Zip files
>
>
>Caused by: org.apache.commons.vfs.FileSystemException: Could not create
>folder "ftp://myAccount:myPassword@myFtpServer.fr/" because it already
>exists and is a file.
>
>
I wonder why VFS tries to create the *root* folder.
Maybe the underlaying ftp-client do have some problems in parsing the
directory-listing ... maybe something with language settings.
Could you please provide a listing using a commandline ftp client - I
would like to see how the directory listoutput is formatted.
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE : RE : [VFS] Asking for a solution with Zip files
Posted by Stéphane Rault <ks...@yahoo.fr>.
By the way, i've the same behaviour with an url like
ftp://myAccount:myPassword@myFtpServer.fr/aFolderThatExist/aFileToCreate
-----Message d'origine-----
De : Mario Ivankovits [mailto:mario@ops.co.at]
Envoyé : vendredi 25 février 2005 12:55
À : Jakarta Commons Developers List
Objet : Re: RE : [VFS] Asking for a solution with Zip files
>
>
>Caused by: org.apache.commons.vfs.FileSystemException: Could not create
>folder "ftp://myAccount:myPassword@myFtpServer.fr/" because it already
>exists and is a file.
>
>
I wonder why VFS tries to create the *root* folder.
Maybe the underlaying ftp-client do have some problems in parsing the
directory-listing ... maybe something with language settings.
Could you please provide a listing using a commandline ftp client - I
would like to see how the directory listoutput is formatted.
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: RE : [VFS] Asking for a solution with Zip files
Posted by Mario Ivankovits <ma...@ops.co.at>.
>
>
>Caused by: org.apache.commons.vfs.FileSystemException: Could not create
>folder "ftp://myAccount:myPassword@myFtpServer.fr/" because it already
>exists and is a file.
>
>
I wonder why VFS tries to create the *root* folder.
Maybe the underlaying ftp-client do have some problems in parsing the
directory-listing ... maybe something with language settings.
Could you please provide a listing using a commandline ftp client - I
would like to see how the directory listoutput is formatted.
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE : [VFS] Asking for a solution with Zip files
Posted by Stéphane Rault <ks...@yahoo.fr>.
Try this
private static void main(String[] args) {
try {
StandardFileSystemManager manager = new
StandardFileSystemManager();
manager.setFilesCache(new SoftRefFilesCache());
manager.init();
FileObject fileFtp = manager
.resolveFile("ftp://myAccount:myPassword@myFtpServer.fr/test.html");
fileFtp.createFile();
} catch (Throwable t) {
System.out.println("It doesn't work !! : " + t);
t.printStackTrace();
}
I catch this stack trace :
org.apache.commons.vfs.FileSystemException: Unknown message with code
"vfs.provider/create-file.error".
at
org.apache.commons.vfs.provider.AbstractFileObject.createFile(AbstractFileOb
ject.java:773)
at test.FileTest.test7(FileTest.java:181)
at test.FileTest.main(FileTest.java:38)
Caused by: org.apache.commons.vfs.FileSystemException: Could not create
folder "ftp://myAccount:myPassword@myFtpServer.fr/" because it already
exists and is a file.
at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFile
Object.java:793)
at
org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractF
ileObject.java:1120)
at
org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractF
ileObject.java:1088)
at
org.apache.commons.vfs.provider.AbstractFileObject.createFile(AbstractFileOb
ject.java:764)
... 2 more
-----Message d'origine-----
De : Mario Ivankovits [mailto:mario@ops.co.at]
Envoyé : vendredi 25 février 2005 10:45
À : Jakarta Commons Developers List
Objet : Re: [VFS] Asking for a solution with Zip files
Stéphane Rault wrote:
>Maybe one of your previous tests already created that folder??
>
>--> I want to create a new file at the root of my ftpserver. Surely the
>folder exist ! But the ftp provider seems to try to create it again. I
>don't understadn why.
>
>
Do you have some code-sniplet you could provide to see what you do.
Maybe a conditional createFolder like:
if (!fo.exists())
{
fo.createFolder();
}
solve your problem !?
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [VFS] Asking for a solution with Zip files
Posted by Mario Ivankovits <ma...@ops.co.at>.
Stéphane Rault wrote:
>Maybe one of your previous tests already created that folder??
>
>--> I want to create a new file at the root of my ftpserver. Surely the
>folder exist ! But the ftp provider seems to try to create it again. I don't
>understadn why.
>
>
Do you have some code-sniplet you could provide to see what you do.
Maybe a conditional createFolder like:
if (!fo.exists())
{
fo.createFolder();
}
solve your problem !?
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org