commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From richard head <dut...@hotmail.com>
Subject RE: VFS FTP AbstractFileObject.isWriteable() Causes NullPointerException
Date Thu, 29 May 2008 21:39:08 GMT

> > 1. I receive a NullPointerException from
> > AbstractFileObject.isWriteable() when I attempt to copy
> > VFSFTPTest.class from a local directory to one on a FTP server:
> >   
> Could you please try the latest VFS (aka 2.0) nightly build, there a lot 
> of stuff in this area has been changed.

Hi! No luck. 

Checked out the source from http://svn.apache.org/repos/asf/commons/proper/vfs/trunk and tried
again with commons-vfs-2.0-SNAPSHOT.jar. This time I received: 

org.apache.commons.vfs.FileSystemException: Could not copy "file:///home/watchit/ftp-test/test/dummy-test-file"
to 
"ftp://mss:XXXX@192.168.9.161/home/logs/preview/dummy-test-file".
        at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:976)
        at org.apache.commons.vfs.impl.DecoratedFileObject.copyFrom(DecoratedFileObject.java:60)
        at org.apache.commons.vfs.cache.OnCallRefreshFileObject.copyFrom(OnCallRefreshFileObject.java:51)
        at org.apache.commons.vfs.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1038)
        at org.apache.commons.vfs.impl.DecoratedFileObject.moveTo(DecoratedFileObject.java:155)
        at org.apache.commons.vfs.cache.OnCallRefreshFileObject.moveTo(OnCallRefreshFileObject.java:141)
        at VFSFTPTest.main(VFSFTPTest.java:40)
Caused by: org.apache.commons.vfs.FileSystemException: Could not determine the type of file
"ftp://mss:XXXX@192.168.9.161/".
        at org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:450)
        at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:880)
        at org.apache.commons.vfs.impl.DecoratedFileObject.createFolder(DecoratedFileObject.java:70)
        at org.apache.commons.vfs.cache.OnCallRefreshFileObject.createFolder(OnCallRefreshFileObject.java:63)
        at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:900)
        at org.apache.commons.vfs.impl.DecoratedFileObject.createFolder(DecoratedFileObject.java:70)
        at org.apache.commons.vfs.cache.OnCallRefreshFileObject.createFolder(OnCallRefreshFileObject.java:63)
        at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:900)
        at org.apache.commons.vfs.impl.DecoratedFileObject.createFolder(DecoratedFileObject.java:70)
        at org.apache.commons.vfs.cache.OnCallRefreshFileObject.createFolder(OnCallRefreshFileObject.java:63)
        at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:900)
        at org.apache.commons.vfs.impl.DecoratedFileObject.createFolder(DecoratedFileObject.java:70)
        at org.apache.commons.vfs.cache.OnCallRefreshFileObject.createFolder(OnCallRefreshFileObject.java:63)
        at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1314)
        at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:411)
        at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:394)
        at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:100)
        at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:967)
        ... 6 more
Caused by: java.lang.NullPointerException
        at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:272)
        at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:267)
        at org.apache.commons.vfs.provider.AbstractFileObject.getParent(AbstractFileObject.java:552)
        at org.apache.commons.vfs.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:194)
        at org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetType(FtpFileObject.java:321)
        at org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:441)
        ... 23 more




> > 2. file.findFiles() will return a 0 length array, or a null array depending on the
FTP server I connect to. 
> >
> >    This should be consistent, one or the other, don't you think?
> >   
> Even this is changed in the version mentioned above. Please give it a try.

Same results. 


_________________________________________________________________
E-mail for the greater good. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message