commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anjana Gopinath <agopin...@truenorth1.com>
Subject [commons vfs] - Issues while trying to ftp to a remote server
Date Tue, 15 Aug 2006 17:08:34 GMT
Hi,

i am a new user of vfs. i am trying to connect to a remote server  
using ftp

		FileSystemOptions opts = new FileSystemOptions();
		FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts, true);
		
		FtpFileObject jarFile = null;
		try {
						
			File file = new File("/");
			jarFile = (FtpFileObject) fsManager.resolveFile("ftp:// 
pulsar007:pass123@host/",opts);
		} catch (FileSystemException e1) {
			
			e1.printStackTrace();
		}

But when i try to list the children, i get an error. i tried getting  
the latest vfs version, commons-vfs-20060815.jar. when i do ftp  
manually to this host, i dont have any issues.  Can some one please  
guide me? Thanks!

  [java] org.apache.commons.vfs.FileSystemException: Could not  
determine the type of file "ftp://pulsar007:pass123@host/".
      [java] at  
org.apache.commons.vfs.provider.AbstractFileObject.attach 
(AbstractFileObject.java:1281)
      [java] at  
org.apache.commons.vfs.provider.AbstractFileObject.getType 
(AbstractFileObject.java:410)
      [java] at  
org.apache.commons.vfs.provider.AbstractFileObject.exists 
(AbstractFileObject.java:400)
      [java] at org.apache.commons.vfs.example.Test.main(Test.java:62)
      [java] Caused by: org.apache.commons.vfs.FileSystemException:  
Object didnt extend from AbstractFileObject. Object "null"
      [java] at  
org.apache.commons.vfs.util.FileObjectUtils.getAbstractFileObject 
(FileObjectUtils.java:50)
      [java] at  
org.apache.commons.vfs.provider.ftp.FtpFileObject.getInfo 
(FtpFileObject.java:174)
      [java] at  
org.apache.commons.vfs.provider.ftp.FtpFileObject.doAttach 
(FtpFileObject.java:166)
      [java] at  
org.apache.commons.vfs.provider.AbstractFileObject.attach 
(AbstractFileObject.java:1267)



Anjana Gopinath







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