Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 36085 invoked from network); 27 Oct 2009 23:04:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Oct 2009 23:04:15 -0000 Received: (qmail 11695 invoked by uid 500); 27 Oct 2009 23:04:13 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 11594 invoked by uid 500); 27 Oct 2009 23:04:12 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 11584 invoked by uid 99); 27 Oct 2009 23:04:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Oct 2009 23:04:12 +0000 X-ASF-Spam-Status: No, hits=-0.3 required=5.0 tests=BAYES_00,FORGED_YAHOO_RCVD X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Oct 2009 23:04:10 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1N2v4v-0002or-9B for user@commons.apache.org; Tue, 27 Oct 2009 16:03:49 -0700 Message-ID: <26086652.post@talk.nabble.com> Date: Tue, 27 Oct 2009 16:03:49 -0700 (PDT) From: tlc To: user@commons.apache.org Subject: Re: [VFS] problem on runtime connection to SFTp server In-Reply-To: <22718714.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: thuylinh_chu@yahoo.com References: <22664327.post@talk.nabble.com> <22676419.post@talk.nabble.com> <18e049e20903240546p344048f7m64bd685c0b08249@mail.gmail.com> <22681000.post@talk.nabble.com> <22681716.post@talk.nabble.com> <22718714.post@talk.nabble.com> I have similar problem. The call to 'resolveFile' failed with 'Unknown scheme "sftp"' error on the second operation. I found couple things: 1) URL is of form sftp://user:pass@host/remotepath/ does not work on Tomcat= .=20 I had to change to using the below to authenticate: StaticUserAuthenticator auth =3D new StaticUserAuthenticator(null, "usernam= e", "password"); DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth); 2) fsManager.close() between operations causes the error. You need to remove this and close it only once when the whole process completes. lmk wrote: >=20 > It seems that the problem comes from release function, when I call It > after copying files, the second SFTP connection fail. >=20 > here the release method code: >=20 > public void release() { > =09=09this.fsManager.close(); >=20 > =09} // release() >=20 >=20 >=20 > lmk wrote: >>=20 >> I have >> commons-net-2.0 >> commons-vfs-1.0 >> jsch-0.1.40 >>=20 >>=20 >> the first call works..but the second one does not. >>=20 >>=20 >>=20 >>=20 >> J=C3=B6rg Schaible-2 wrote: >>>=20 >>> lmk wrote at Dienstag, 24. M=C3=A4rz 2009 14:58: >>>=20 >>>>=20 >>>> Hi Sergey, >>>>=20 >>>> here the exception trace >>>>=20 >>>> org.apache.commons.vfs.FileSystemException: Unknown scheme "sftp" in >>>> URI >>>> "sftp://login:password@host/path/". >>>=20 >>> This is an error message, but not a stack trace. However, it seems that >>> you >>> do not have commons-net and jsch in your deps ... >>>=20 >>> - J=C3=B6rg >>>=20 >>>=20 >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>> For additional commands, e-mail: user-help@commons.apache.org >>>=20 >>>=20 >>>=20 >>=20 >>=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/-VFS--problem-on-runtim= e-connection-to-SFTp-server-tp22664327p26086652.html Sent from the Commons - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org