[ http://issues.apache.org/jira/browse/VFS-77?page=all ]
Mario Ivankovits resolved VFS-77.
---------------------------------
Fix Version/s: Nightly Builds
Resolution: Fixed
should be fixed now, please check it.
Thanks!
Ciao,
Mario
> VFS cannot determine file type of root for FTP, prevents listing of children
> at root
> ------------------------------------------------------------------------------------
>
> Key: VFS-77
> URL: http://issues.apache.org/jira/browse/VFS-77
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Windows, Eclipse, Java 1.5
> commons-vfs-20060808.zip
> commons-net-1.4.1.jar, etc. (not sure one of the dependencies is the real
> problem)
> Reporter: Ben Ashpole
> Fix For: Nightly Builds
>
>
> The following example, adapted from
> http://jakarta.apache.org/commons/vfs/api.html, throws the below exception
> for the given, valid FTP site. Please let me know if this issue can be
> replicated!
> FileSystemManager fsManager = VFS.getManager();
> FileObject f = fsManager.resolveFile("ftp://ftp.uspto.gov/");
> FileObject[] children = f.getChildren(); // exception thrown here
> System.out.println("Children of "+f.getName().getURI());
> for(int i = 0; i<children.length; i++)
> {
> System.out.println(children[i].getName().getBaseName());
> }
> Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could
> not determine the type of file "ftp://ftp.uspto.gov/".
> at
> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1281)
> at
> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:410)
> at
> org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractFileObject.java:523)
> at com.bashpole.reflectorGadget.reflectionGroup.Ftp.test(Ftp.java:55)
> at com.bashpole.reflectorGadget.reflectionGroup.Ftp.main(Ftp.java:24)
> Caused by: org.apache.commons.vfs.FileSystemException: Object didnt extend
> from AbstractFileObject. Object "{0}"
> at
> org.apache.commons.vfs.util.FileObjectUtils.getAbstractFileObject(FileObjectUtils.java:50)
> at
> org.apache.commons.vfs.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:174)
> at
> org.apache.commons.vfs.provider.ftp.FtpFileObject.doAttach(FtpFileObject.java:166)
> at
> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1267)
> ... 4 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]