You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Mario Ivankovits (JIRA)" <ji...@apache.org> on 2006/10/03 21:54:20 UTC
[jira] Resolved: (VFS-28) [vfs] Exception using ftp when copying to
a directory with a tab in its name
[ http://issues.apache.org/jira/browse/VFS-28?page=all ]
Mario Ivankovits resolved VFS-28.
---------------------------------
Resolution: Cannot Reproduce
> [vfs] Exception using ftp when copying to a directory with a tab in its name
> ----------------------------------------------------------------------------
>
> Key: VFS-28
> URL: http://issues.apache.org/jira/browse/VFS-28
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Operating System: Windows XP
> Platform: All
> Reporter: Andreas
> Attachments: FtpCheckOutput.txt, FTPTransport.java, FTPTransport.java, OutputOfFtpCheck.txt
>
>
> Hello,
> When I'm trying to copy a file from Windows XP Professional to a directory with
> a tab in its name on a remote Sun Solaris Server I got an exception. It also
> doesn't work if you try to copy the file from an Solaris server to another
> Solaris server. The exception occurs not in the copy action itself, but when
> checking the file size of the copied file on the remote server.
> The exception is
> org.apache.commons.vfs.FileSystemException: Could not determine the size of file
> "ftp://myuser:mypassword@mySolarisServerIP/tmp/DeltaBuckets -
> Americas/atlasfile.20050501".
> at
> org.apache.commons.vfs.provider.DefaultFileContent.getSize(DefaultFileContent.java:111)
> at de.andreas.transport.FTPTransport.main(FTPTransport.java:31)
> Caused by: java.lang.NullPointerException
> at
> org.apache.commons.vfs.provider.ftp.FtpFilexObject.doGetContentSize(FtpFilexObject.java:404)
> at
> org.apache.commons.vfs.provider.DefaultFileContent.getSize(DefaultFileContent.java:107)
> ... 1 more
> It occurs in the following java program/snippet.
> package de.andreas.transport;
> import java.io.*;
> import org.apache.commons.vfs.*;
> import org.apache.commons.vfs.provider.AbstractFileSystem;
> public class FTPTransport {
>
> //Using commons-vfs-1.0-RC4.jar from
> commons-vfs-20051011.zip
>
> public static void main(String[] args){
> try {
> //copy a file via ftp to a remote server
> FilexObject quelle =
> VFS.getManager().resolveFile("file://c:/daten/spice/export/ATLAS/atlasfile.20050501");
> FilexObject ziel = null;
> //works
> //ziel =
> VFS.getManager().resolveFile("ftp://myuser:mypassword@mySolarisServerIP/tmp/DeltaBuckets-Americas/atlasfile.20050501");
>
> //doesn't work
> ziel =
> VFS.getManager().resolveFile("ftp://myuser:mypassword@mySolarisServerIP/tmp/DeltaBuckets-Americas/atlasfile.20050501");
>
> //doesn't work
> //ziel =
> VFS.getManager().resolveFile("ftp://myuser:mypassword@mySolarisServerIP/tmp/DeltaBuckets
> - Americas/atlasfile.20050501");
>
> ziel.copyFrom(quelle,
> Selectors.SELECT_ALL);//works fine
> //check fileSizes
> if (ziel.getContent().getSize() ==
> quelle.getContent().getSize()){
> System.out.println("Good!");
>
> }
> else {
> System.out.println("Bad!");
> }
> } catch (Exception ex){
> ex.printStackTrace();
> }
> }
>
> /*
> log4j:WARN No appenders could be found for logger
> (org.apache.commons.vfs.impl.StandardFileSystemManager).
> log4j:WARN Please initialize the log4j system properly.
> org.apache.commons.vfs.FileSystemException: Could not determine the size of file
> "ftp://myuser:mypassword@mySolarisServerIP/tmp/DeltaBuckets -
> Americas/atlasfile.20050501".
> at
> org.apache.commons.vfs.provider.DefaultFileContent.getSize(DefaultFileContent.java:111)
> at de.hvb.m0.business.mds.transport.FTPTransport.main(FTPTransport.java:31)
> Caused by: java.lang.NullPointerException
> at
> org.apache.commons.vfs.provider.ftp.FtpFilexObject.doGetContentSize(FtpFilexObject.java:404)
> at
> org.apache.commons.vfs.provider.DefaultFileContent.getSize(DefaultFileContent.java:107)
> ... 1 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org