Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 95711 invoked from network); 4 Mar 2008 12:22:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 12:22:02 -0000 Received: (qmail 88037 invoked by uid 500); 4 Mar 2008 12:21:56 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 87915 invoked by uid 500); 4 Mar 2008 12:21:56 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 87869 invoked by uid 99); 4 Mar 2008 12:21:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 04:21:56 -0800 X-ASF-Spam-Status: No, hits=-1998.0 required=10.0 tests=ALL_TRUSTED,URIBL_BLACK X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 12:21:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B36EE234C08C for ; Tue, 4 Mar 2008 04:20:40 -0800 (PST) Message-ID: <892547733.1204633240733.JavaMail.jira@brutus> Date: Tue, 4 Mar 2008 04:20:40 -0800 (PST) From: "Satish Kumar Kommuri (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (VFS-201) FTP is failing by saying "File doesn't exist" even the file exists and a valid file. In-Reply-To: <638682237.1204292212401.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VFS-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574949#action_12574949 ] Satish Kumar Kommuri commented on VFS-201: ------------------------------------------ Adding to the problem, The same code works fine from one machine and doesn't work from another. Even though both are Linux machines. Don't know where it is going wrong. Could you please suggest which and all parameters to be verified and corrected in a machine to make this work. > 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 " 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.