commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tlc <thuylinh_...@yahoo.com>
Subject Re: [VFS] problem on runtime connection to SFTp server
Date Tue, 27 Oct 2009 23:03:49 GMT


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. 
I had to change to using the below to authenticate:
StaticUserAuthenticator auth = new StaticUserAuthenticator(null, "username",
"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:
> 
> It seems that the problem comes from release function, when I call It
> after  copying files, the second SFTP connection fail.
> 
> here the release method code:
> 
> public void release() {
> 		this.fsManager.close();
> 
> 	} // release()
> 
> 
> 
> lmk wrote:
>> 
>> I have
>>  commons-net-2.0
>> commons-vfs-1.0
>> jsch-0.1.40
>> 
>> 
>> the first call works..but the second  one does not.
>> 
>> 
>> 
>> 
>> Jörg Schaible-2 wrote:
>>> 
>>> lmk wrote at Dienstag, 24. März 2009 14:58:
>>> 
>>>> 
>>>> Hi Sergey,
>>>> 
>>>> here the exception trace
>>>> 
>>>> org.apache.commons.vfs.FileSystemException: Unknown scheme "sftp" in
>>>> URI
>>>> "sftp://login:password@host/path/".
>>> 
>>> 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 ...
>>> 
>>> - Jörg
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-VFS--problem-on-runtime-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


Mime
View raw message