commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MH (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (VFS-454) SFTP: first access OK, second acceds: Unknown scheme "sftp" in URI "sftp://..."
Date Thu, 07 Feb 2013 15:25:14 GMT

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

MH edited comment on VFS-454 at 2/7/13 3:24 PM:
------------------------------------------------

Temporary workaround:  remove (!!!) the closing call:

--- code start ---
//((DefaultFileSystemManager) vfs).close(); //THIS CAUSES FileSystemException: Unknown scheme
"sftp" in URI "sftp://...
--- code end ---

Without this close() call, subsequent calls work ...! So much to (http://commons.apache.org/vfs/api.html):

"You should make sure that you call close() on the manager when you are finished with it."

...
                
      was (Author: mhilpert):
    Temporary workaround:  remove (!!!) the clsoing call:

//((DefaultFileSystemManager) vfs).close(); //THIS CAUSES FileSystemException: Unknown scheme
"sftp" in URI "sftp://...

Without this close() call, subsequent calls work ...! So much to (http://commons.apache.org/vfs/api.html):

"You should make sure that you call close() on the manager when you are finished with it."

...
                  
> SFTP: first access OK, second acceds: Unknown scheme "sftp" in URI "sftp://..."
> -------------------------------------------------------------------------------
>
>                 Key: VFS-454
>                 URL: https://issues.apache.org/jira/browse/VFS-454
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Java 1.7.0_13 64 Bit
>            Reporter: MH
>            Priority: Critical
>
> I access files from an SFTP server and accesm them roughly via
> -----------------
> vfs.resolveFile(uri, opts);
> ...
> vfs.resolveFile(cwd, directory);
> ...
> cwd.getChildren();
> ...
> vfs.resolveFile(fn);
> ...
> ((DefaultFileSystemManager) vfs).close();
> --------------------------
> If the same code runs a second time, the first call to resolveFile() throws
>     Unknown scheme "sftp" in URI "sftp://..."
> I tried 
>   vfs.closeFileSystem(children[0].getFileSystem());
> like stated in http://wiki.apache.org/commons/SimpleSftpFileDownload, but this doesn't
help!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message