commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilian HALOUIN (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (VFS-634) DefaultFileSystemManager.close() throw FileSystemException
Date Thu, 27 Apr 2017 07:25:05 GMT

    [ https://issues.apache.org/jira/browse/VFS-634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986142#comment-15986142
] 

Gilian HALOUIN commented on VFS-634:
------------------------------------

Only the warning, but the replicated directory isn't delete after termination.

> DefaultFileSystemManager.close() throw FileSystemException
> ----------------------------------------------------------
>
>                 Key: VFS-634
>                 URL: https://issues.apache.org/jira/browse/VFS-634
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: windows
>            Reporter: Gilian HALOUIN
>
> Hi,
> We face an issue when we use the DefaultFileSystemManager.
> With this example :
> {code:java}
> import org.apache.commons.vfs2.FileObject;
> import org.apache.commons.vfs2.FileSystemException;
> import org.apache.commons.vfs2.Selectors;
> import org.apache.commons.vfs2.VFS;
> import org.apache.commons.vfs2.impl.DefaultFileSystemManager;
> /**
>  * @author GHALOUIN
>  *
>  */
> public class TestVFS {
>     /**
>      * @param args
>      * @throws FileSystemException
>      */
>     public static void main(final String[] args) throws FileSystemException {
>         final DefaultFileSystemManager vfsManager = (DefaultFileSystemManager) VFS.getManager();
>         final FileObject tempDir = vfsManager.resolveFile("tmp://simulation");
>         final FileObject fileSrc = vfsManager.resolveFile("C:/toto.txt");
>         tempDir.resolveFile("toto").copyFrom(fileSrc, Selectors.SELECT_SELF);
>         vfsManager.close();
>     }
> }
> {code}
> At the close call we have the following error :
> INFOS: Using "C:\Users\ghalouin\AppData\Local\Temp\vfs_cache" as temporary files store.
> avr. 21, 2017 4:21:27 PM org.apache.commons.vfs2.impl.StandardFileSystemManager warn
> AVERTISSEMENT: Could not clean up temporary file "tmp_382_tempfs".
> org.apache.commons.vfs2.FileSystemException: Incorrect file system URI "file:///C:/"
in name "file:///C:/Users/ghalouin/AppData/Local/Temp/vfs_cache/tmp_382_tempfs", was expecting
"file:///C:".
> 	at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:324)
> 	at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:317)
> 	at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:84)
> 	at org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider.findLocalFile(DefaultLocalFileProvider.java:106)
> 	at org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider.findLocalFile(DefaultLocalFileProvider.java:119)
> 	at org.apache.commons.vfs2.impl.DefaultFileSystemManager.toFileObject(DefaultFileSystemManager.java:1003)
> 	at org.apache.commons.vfs2.impl.DefaultVfsComponentContext.toFileObject(DefaultVfsComponentContext.java:78)
> 	at org.apache.commons.vfs2.impl.DefaultFileReplicator.deleteFile(DefaultFileReplicator.java:172)
> 	at org.apache.commons.vfs2.impl.DefaultFileReplicator.close(DefaultFileReplicator.java:111)
> 	at org.apache.commons.vfs2.impl.PrivilegedFileReplicator$CloseAction.run(PrivilegedFileReplicator.java:195)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.commons.vfs2.impl.PrivilegedFileReplicator.close(PrivilegedFileReplicator.java:113)
> 	at org.apache.commons.vfs2.impl.DefaultFileSystemManager.closeComponent(DefaultFileSystemManager.java:500)
> 	at org.apache.commons.vfs2.impl.DefaultFileSystemManager.close(DefaultFileSystemManager.java:604)
> 	at testVFS.TestVFS.main(TestVFS.java:29)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message