You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ramji Sridaran (Jira)" <ji...@apache.org> on 2021/07/07 16:44:00 UTC

[jira] [Commented] (VFS-773) Could not find file with URI "sftp://max_s_maeder@35.232.72.5:22/hi.html" because it is a relative path, and no base URI was provided.

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

Ramji Sridaran commented on VFS-773:
------------------------------------

Any resolution/fix related to this issue?

> Could not find file with URI "sftp://max_s_maeder@35.232.72.5:22/hi.html" because it is a relative path, and no base URI was provided.
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: VFS-773
>                 URL: https://issues.apache.org/jira/browse/VFS-773
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>         Environment: Google Cloud Engine instance with default firewall settings
>            Reporter: Max Maeder
>            Priority: Major
>   Original Estimate: 2m
>  Remaining Estimate: 2m
>
> I've been pulling my hair out over this issue, I've searched the interwebs and this issue tracker for someone having a similar issue, but to no avail.
> Every time I run the following code, I get this error:
>  
> {code:java}
> org.apache.commons.vfs2.FileSystemException: Could not find file with URI "sftp://max_s_maeder@35.232.72.5:22/hi.html" because it is a relative path, and no base URI was provided.
> [01:58:12] [Thread-14/WARN]:    at org.apache.commons.vfs2.FileSystemException.requireNonNull(FileSystemException.java:87)
> [01:58:12] [Thread-14/WARN]:    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:734)
> [01:58:12] [Thread-14/WARN]:    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:683)
> [01:58:12] [Thread-14/WARN]:    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:638)
> [01:58:12] [Thread-14/WARN]:    at ratismal.drivebackup.ftp.SFTPUploader.uploadFile(SFTPUploader.java:55)
> [01:58:12] [Thread-14/WARN]:    at ratismal.drivebackup.ftp.FTPUploader.uploadFile(FTPUploader.java:37)
> [01:58:12] [Thread-14/WARN]:    at ratismal.drivebackup.UploadThread.run(UploadThread.java:96)
> [01:58:12] [Thread-14/WARN]:    at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
>  
>  
> {code:java}
> package ratismal.drivebackup.ftp;
> import org.apache.commons.vfs2.FileObject;import org.apache.commons.vfs2.FileSystemManager;import org.apache.commons.vfs2.VFS;
> import ratismal.drivebackup.config.Config;import ratismal.drivebackup.util.MessageUtil;
> import java.io.File;import java.util.*;
> public class SFTPUploader {
>   public static void uploadFile() throws Exception {    FileSystemManager manager = VFS.getManager();
>     FileObject remoteFolder = manager.resolveFile("sftp://max_s_maeder@35.232.72.5:22/hi.html");
>     remoteFolder.close();  }}
> {code}
> I'm sorry if this is the wrong place to ask.
> Also, the credentials above aren't going to get you into my server ;)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)