commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Am...@bci.co.mz>
Subject VFS SFTP
Date Wed, 26 Oct 2005 15:10:48 GMT
I have a problem when I run this:

 

FileSystemManager fsm = VFS.getManager();

FileSystemOptions opts = new FileSystemOptions();

SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(opts,
"no");

FileObject dir =
fsm.resolveFile("sftp://user:password@host:port/parentdir/childdir/",
opts); 

FileObject[] fich = dir.getChildren();

 

This last line throws the following error:

org.apache.commons.vfs.FileSystemException: Could not list the contents
of folder " sftp://user:password@host:port/parentdir/childdir"

        at
org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractF
ileObject.java:553)

            ...

Caused by: java.lang.ClassCastException

        at
org.apache.commons.vfs.provider.sftp.SftpFileObject.doListChildren(SftpF
ileObject.java:247)

        at
org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractF
ileObject.java:549)

 

I am using 2005-10-24 build and I cannot figure out what is wrong.

 

When I point to a ftp it works fine.

 

Any idea?


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message