Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 52630 invoked from network); 29 Jan 2008 15:01:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jan 2008 15:01:12 -0000 Received: (qmail 4914 invoked by uid 500); 29 Jan 2008 15:00:58 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 4833 invoked by uid 500); 29 Jan 2008 15:00:58 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 4798 invoked by uid 99); 29 Jan 2008 15:00:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2008 07:00:57 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [208.75.86.161] (HELO vafer.org) (208.75.86.161) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2008 15:00:41 +0000 Received: from dslb-084-058-059-038.pools.arcor-ip.net ([84.58.59.38]:33454 helo=[10.0.1.4]) by vafer.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.67) (envelope-from ) id 1JJrws-00082i-Ra for user@commons.apache.org; Tue, 29 Jan 2008 15:00:31 +0000 Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: <479F3BEF.3060809@ops.co.at> References: <479F2EDD.1050508@ops.co.at> <479F3426.30102@ops.co.at> <479F3BEF.3060809@ops.co.at> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <8B28FB9D-A420-4B36-B2AB-CA28AB5D8355@apache.org> Content-Transfer-Encoding: quoted-printable From: Torsten Curdt Subject: Re: [vfs] Inconsistent Behavior... Date: Tue, 29 Jan 2008 16:01:01 +0100 To: "Jakarta Commons Users List" X-Mailer: Apple Mail (2.753) X-Virus-Checked: Checked by ClamAV on apache.org Frankly speaking this sounds awfully like something I have =20 encountered (and fixed) before. ...but that has been years ago and my brain just does not want to =20 spit it out. Bah! Sorry :( cheers -- Torsten On 29.01.2008, at 15:45, Mario Ivankovits wrote: > Hi! > > I think your only chance is to use tcpdump and/or wireshark to =20 > debug the > network flow to see the real answers of the ftp server. > Or debug into the VFS code ... somewhere in doAttach in FtpFileObject > and see whats going wrong in there. > > Sorry! > > Ciao, > Mario > >> Well, I ran it once and it said "The file type is file" and it >> succeeded, but then I ran it again and it says "The file type is >> imaginary" and it failed. Here's the code: >> >> final FileSystemManager fsm =3D VFS.getManager(); >> final FileObject remoteFile =3D >> fsm.resolveFile("ftp://ftp.ncbi.nih.gov/pub/HomoloGene/current/=20 >> homologene.data"); >> System.out.println("The file type is " + >> remoteFile.getType().getName() + "."); >> final File tmp =3D File.createTempFile("download", ".txt"); >> tmp.deleteOnExit(); >> final FileObject tempFile =3D fsm.toFileObject(tmp); >> FileUtil.copyContent(remoteFile, tempFile); >> >> Here's the complete output: >> >> 01-29@09:18:11 INFO (DefaultFileReplicator) - Using >> "C:\Users\jcarman\AppData\Local\Temp\vfs_cache" as temporary files >> store. >> 01-29@09:18:12 DEBUG (StandardFileSystemManager) - Skipping >> provider "org.apache.commons.vfs.provider.sftp.SftpFileProvider" >> because required class "com.jcraft.jsch.JSch" is not available. >> 01-29@09:18:12 DEBUG (StandardFileSystemManager) - Skipping >> provider "org.apache.commons.vfs.provider.smb.SmbFileProvider" =20 >> because >> required class "jcifs.smb.SmbFile" is not available. >> 01-29@09:18:12 DEBUG (SoftRefFilesCache) - putFile: >> ftp://ftp.ncbi.nih.gov/pub/HomoloGene/current/homologene.data >> 01-29@09:18:12 DEBUG (SoftRefFilesCache) - putFile: ftp://=20 >> ftp.ncbi.nih.gov/ >> 01-29@09:18:12 DEBUG (SoftRefFilesCache) - putFile: >> ftp://ftp.ncbi.nih.gov/pub/HomoloGene/current >> 01-29@09:18:12 DEBUG (SoftRefFilesCache) - putFile: >> ftp://ftp.ncbi.nih.gov/pub/HomoloGene >> 01-29@09:18:12 DEBUG (SoftRefFilesCache) - putFile: >> ftp://ftp.ncbi.nih.gov/pub >> The file type is imaginary. >> 01-29@09:18:13 DEBUG (SoftRefFilesCache) - putFile: >> file:///C:/Users/jcarman/AppData/Local/Temp/download14482.txt >> Exception in thread "main" =20 >> org.apache.commons.vfs.FileSystemException: >> Could not read from >> "ftp://ftp.ncbi.nih.gov/pub/HomoloGene/current/homologene.data" >> because it is a not a file. >> at =20 >> org.apache.commons.vfs.provider.AbstractFileObject.getInputStream=20 >> (AbstractFileObject.java:1149) >> at =20 >> org.apache.commons.vfs.provider.DefaultFileContent.getInputStream=20 >> (DefaultFileContent.java:360) >> at = org.apache.commons.vfs.FileUtil.writeContent(FileUtil.java:71) >> at = org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:103) >> >> I left out the project-specific parts of the stack trace because it's >> not relevant, but there were no nested exceptions. >> >> On 1/29/08, Mario Ivankovits wrote: >> >>> Hi! >>> >>>> Did you get my second email? That's the entire output I got =20 >>>> when I ran it. >>>> >>>> >>> Uh, oh, ok! >>> >>> So then, it seems that VFS thinks the file is either a directory =20 >>> or non >>> existent. >>> >>> Could you please: >>> >>> *) check the filetype of the FileObject see if its virtual or =20 >>> whatever >>> *) try to connect to the ftp server using a commandline tool to =20 >>> see if >>> the ftp output is in a style which makes it impossible for =20 >>> commons-net >>> to parse the output, e.g. due to localized date format. >>> >>> Ciao, >>> Mario >>> >>> >>> --------------------------------------------------------------------=20= >>> - >>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>> For additional commands, e-mail: user-help@commons.apache.org >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >> >> > > > --=20 > mit freundlichen Gr=FC=DFen > > Mario Ivankovits > Software Engineering > > OPS EDV VertriebsgesmbH > A-1120 Wien, Michael-Bernhard-Gasse 10 > > Firmenbuch Nr.: FN51233v, Handelsgericht Wien > Tel.: +43-1-8938810; Fax: +43-1-8938810/3700 > http://www.ops.co.at > > E-Mail: mario@ops.co.at > Skype: mario_ivankovits > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org