commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Balakrishnan J (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (VFS-592) ftp IPV6 URI always throws 550 Failed to change directory to Remote Root Directory
Date Thu, 07 Jan 2016 12:15:39 GMT

     [ https://issues.apache.org/jira/browse/VFS-592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Balakrishnan J updated VFS-592:
-------------------------------
    Description: 
FTP URI when connected with IPV6 machine always throws either of the following 

1) 550 Failed to change directory to Remote Root Directory
2) org.apache.commons.vfs2.FileSystemException: Could not determine the type of file

The code snippet :
-----------------------------

public void performFTP() throws IOException
{
		FileObject rootDirFileObject;
        
        FileSystemManager vfsManager = VFS.getManager();
        UserAuthenticator auth = new StaticUserAuthenticator(null, "ipv6test","Welcome6");

        FileSystemOptions opts = new FileSystemOptions();
        FtpFileSystemConfigBuilder.getInstance().setPassiveMode(opts, true);
        FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts, true);
        
        DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);
        rootDirFileObject = vfsManager.resolveFile("ftp://adc00pcf.us.oracle.com/abc", opts);
        
        if(rootDirFileObject == null || !rootDirFileObject.exists()){
            try {
 			throw new Exception("ftp.connection.remote.path.does.not.exist");
            } catch (Exception e) {
            	// TODO Auto-generated catch block
            	e.printStackTrace();
            }
        }
}


  was:
FTP URI when connected with IPV6 machine always throws either of the following 

1) 550 Failed to change directory to Remote Root Directory
2) org.apache.commons.vfs2.FileSystemException: Could not determine the type of file

The code snippet :
-----------------------------

public void performFTP() throws IOException
{
		FileObject rootDirFileObject;
        
        FileSystemManager vfsManager = VFS.getManager();
        UserAuthenticator auth = new StaticUserAuthenticator(null, "ipv6test","Welcome6");

        FileSystemOptions opts = new FileSystemOptions();
        FtpFileSystemConfigBuilder.getInstance().setPassiveMode(opts, true);
        FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts, true);
        
        DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);
        rootDirFileObject = m_FsManager.resolveFile("ftp://adc00pcf.us.oracle.com/abc", opts);
        
        if(rootDirFileObject == null || !rootDirFileObject.exists()){
            try {
 			throw new Exception("ftp.connection.remote.path.does.not.exist");
            } catch (Exception e) {
            	// TODO Auto-generated catch block
            	e.printStackTrace();
            }
        }
}



> ftp IPV6 URI always throws 550 Failed to change directory to Remote Root Directory
> ----------------------------------------------------------------------------------
>
>                 Key: VFS-592
>                 URL: https://issues.apache.org/jira/browse/VFS-592
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Balakrishnan J
>            Priority: Critical
>
> FTP URI when connected with IPV6 machine always throws either of the following 
> 1) 550 Failed to change directory to Remote Root Directory
> 2) org.apache.commons.vfs2.FileSystemException: Could not determine the type of file
> The code snippet :
> -----------------------------
> public void performFTP() throws IOException
> {
> 		FileObject rootDirFileObject;
>         
>         FileSystemManager vfsManager = VFS.getManager();
>         UserAuthenticator auth = new StaticUserAuthenticator(null, "ipv6test","Welcome6");
>         FileSystemOptions opts = new FileSystemOptions();
>         FtpFileSystemConfigBuilder.getInstance().setPassiveMode(opts, true);
>         FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts, true);
>         
>         DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);
>         rootDirFileObject = vfsManager.resolveFile("ftp://adc00pcf.us.oracle.com/abc",
opts);
>         
>         if(rootDirFileObject == null || !rootDirFileObject.exists()){
>             try {
>  			throw new Exception("ftp.connection.remote.path.does.not.exist");
>             } catch (Exception e) {
>             	// TODO Auto-generated catch block
>             	e.printStackTrace();
>             }
>         }
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message