[
https://issues.apache.org/jira/browse/VFS-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17291832#comment-17291832
]
Gary D. Gregory commented on VFS-592:
-------------------------------------
Please try Commons VFS 2.7.0.
> 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: Blocker
>
> 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
(v8.3.4#803005)