commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Haider (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (VFS-201) FTP is failing by saying "File doesn't exist" even the file exists and a valid file.
Date Mon, 03 Mar 2008 13:38:55 GMT

    [ https://issues.apache.org/jira/browse/VFS-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574497#action_12574497
] 

ohaider edited comment on VFS-201 at 3/3/08 5:38 AM:
-----------------------------------------------------------

Hi,

we were facing the same  "<particular file> does not exist" problem last Friday (the
29. of February).

After tracing the Problem for quite a while we figured out the problem was caused by the intercalary
day. The Apache-FTP-Code tries to parse the target/source-File Date on the FTP site and can't
cope with the 29.02 returning a "null" instead of a Fileobject and thus returning a "file
not found".

I think this Problem even occurs if any of the root-directories got a timestamp on that day.
Hope we get a fix within the next 4 years ;-)

Regards

Oliver


      was (Author: ohaider):
    Hi,

we were facing the same  "<particular file> does not exist" problem last Friday (the
29. of February).

After tracing the Problem for quite a while we figured out the problem was caused by the intercalary
day. The Apache-FTP-Code tries to parse the target/source-File Date on the FTP site and can't
cope with the 29.02 returning a "null" instead of a Fileobject and thus returns a "file not
found".

I think this Problem even occurs if any of the root-directories got a timestamp on that day.
Hope we get a fix within the next 4 years ;-)

Regards

Oliver

  
> FTP is failing by saying "File doesn't exist" even the file exists and a valid file.
> ------------------------------------------------------------------------------------
>
>                 Key: VFS-201
>                 URL: https://issues.apache.org/jira/browse/VFS-201
>             Project: Commons VFS
>          Issue Type: Bug
>         Environment: Linux
>            Reporter: Satish Kumar Kommuri
>
> Hi,
> We are facing a strange problem with vfs file transfer from one of the FTP locations.
Java code throws the FileSystemException by saying "<particular file> does not exist".
On the other hand, FTP to that site and wget are working.
> Please find the code snippent below:
>  FileSystemOptions fso = new FileSystemOptions();
>  SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(fso, "no");
>  FileObject sourceFileObject = fsm.resolveFile(sourceUri, fso);
>  String sourceFilePath = sourceFileObject.getName().getPath();
>  FileObject targetFileObject = fsm.resolveFile(targetUri, fso);
> FileObject tfo = targetFileObject;
> if(tfo.getType() == FileType.FOLDER)
> 	tfo = targetFileObject.resolveFile(sourceFileObject.getName().getBaseName());
> 	LOGGER.info("The URI is a file");
>        LOGGER.info("Remote Path: [" + sourceFileObject.getName().getPath() + "] Local
Path: [" + tfo.getName().getPath() + "]");
> 	copyFile(sourceFileObject, tfo);
> copyFrom method:
>  private void copyFile(FileObject sourceFileObject, FileObject targetFileObject) 
> 	 {		
> 			targetFileObject.copyFrom(sourceFileObject, new AllFileSelector()); 
> 			copiedFiles.add(sourceFileObject.getName().getPath());
> 		} catch (FileSystemException e) 
> 		{
> 			failedFiles.add(sourceFileObject.getName().getPath());
> 			failedFileExceptions.add(e);
> 			LOGGER.error("Exception in FileTransferAgent:copyFile "+e);
> 		}
> 	 }
> exception is:
> Exception in FileTransferAgent:copyFile org.apache.commons.vfs.FileSystemException: Could
not copy "ftp://usename:password@ipaddress/home/blrproj/console.out" because it does not exist.
> org.apache.commons.vfs.FileSystemException: Could not copy "ftp://usename:password@ipaddress/home/blrproj/console.out"
because it does not exist.
>         at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:858)
>         at FileTransferAgent.copyFile(FileTransferAgent.java:153)
>         at FileTransferAgent.copyFiles(FileTransferAgent.java:131)
>         at FileTransferAgent.main(FileTransferAgent.java:238)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message