You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mario Ivankovits <ma...@ops.co.at> on 2006/08/22 09:39:03 UTC

Re: [vfs] Re: unknown protocol: sftp

Hi!
> FileObject fo =
> fsm.resolveFile("sftp://domain/user:password@10.10.10.5
> <ma...@10.10.10.5>");
Please try:

FileObject fo = fsm.resolveFile("sftp://domain\\user:password@10.10.10.5
<ma...@10.10.10.5>");


Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] Re: unknown protocol: sftp

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Puneet!

Please ensure you responde to the commons-user mailinglist too - to say
the truth, its sufficient to answer there, I'll pick it up from there too.
> org.apache.commons.vfs.FileSystemException: Invalid absolute URI
> "sftp://domain\
> user:password@10.10.10.5 <ma...@10.10.10.5> <
> mailto:sftp://domain/user:password@10.10.10.5>".
Oh boy, I completely overlooked that you use sftp, in sftp there is no
specification for the domain.

Do you use a linux setup with pam and samba? Then you might have to "%"
encode the "/" character or whatever character you used in your setup.
Something like sftp://domain%2fuser:password@10.10.10.5 might do the
trick. <ma...@10.10.10.5>

Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] Re: unknown protocol: sftp

Posted by Puneet Singh Lamba <ps...@gmail.com>.
Mario - thank you for your responsiveness.

First I got the following.

org.apache.commons.vfs.FileSystemException: Invalid absolute URI
"sftp://domain\
user:password@10.10.10.5
<ma...@10.10.10.5>
>".
        at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findF
ile(AbstractOriginatingFileProvider.java:57)
        at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile
(Defa
ultFileSystemManager.java:640)
        at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile
(Defa
ultFileSystemManager.java:601)
        at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile
(Defa
ultFileSystemManager.java:569)
        at com.ibm.kms.decentralization.SFTPVFSClient.run(SFTPVFSClient.java
:16)
        at com.ibm.kms.decentralization.SFTPVFSClient.main(
SFTPVFSClient.java:27
)
Caused by: org.apache.commons.vfs.FileSystemException: Port number is
missing fr
om URI "sftp://domain\user:password@10.10.10.5 <
mailto:sftp://domain/user:password@10.10.10.5<sf...@10.10.10.5>
>".
        at org.apache.commons.vfs.provider.HostFileNameParser.extractPort
(HostFi
leNameParser.java:228)
        at org.apache.commons.vfs.provider.HostFileNameParser.extractToPath
(Host
FileNameParser.java:133)
        at org.apache.commons.vfs.provider.URLFileNameParser.parseUri
(URLFileNam
eParser.java:47)
        at org.apache.commons.vfs.provider.AbstractFileProvider.parseUri
(Abstrac
tFileProvider.java:166)
        at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findF
ile(AbstractOriginatingFileProvider.java:53)

After adding the port, I get the following.

org.apache.commons.vfs.FileSystemException: Invalid absolute URI "
sftp://domain\user:password@10.10.10.5:22 <
mailto:sftp://domain/user:password@10.10.10.5<sf...@10.10.10.5>
>"
.
        at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findF
ile(AbstractOriginatingFileProvider.java:57)
        at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile
(Defa
ultFileSystemManager.java:640)
        at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile
(Defa
ultFileSystemManager.java:601)
        at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile
(Defa
ultFileSystemManager.java:569)
        at com.ibm.kms.decentralization.SFTPVFSClient.run(SFTPVFSClient.java
:16)
        at com.ibm.kms.decentralization.SFTPVFSClient.main(
SFTPVFSClient.java:27
)
Caused by: org.apache.commons.vfs.FileSystemException: Expecting / to follow
the
 hostname in URI "sftp://domain\user:password@10.10.10.5:22 <
mailto:sftp://domain/user:password@10.10.10.5<sf...@10.10.10.5>
>".
        at org.apache.commons.vfs.provider.HostFileNameParser.extractToPath
(Host
FileNameParser.java:138)
        at org.apache.commons.vfs.provider.URLFileNameParser.parseUri
(URLFileNam
eParser.java:47)
        at org.apache.commons.vfs.provider.AbstractFileProvider.parseUri
(Abstrac
tFileProvider.java:166)
        at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findF
ile(AbstractOriginatingFileProvider.java:53)

Finally, the program seems to hang when I use the following URI with or
without the port:

FileObject fo = fsm.resolveFile("sftp://domain\\user:password@10.10.10.5
:22");

Thanks,

Puneet



On 8/22/06, Mario Ivankovits <ma...@ops.co.at> wrote:
>
> Hi!
> > FileObject fo =
> > fsm.resolveFile("sftp://domain/user:password@10.10.10.5
> > <ma...@10.10.10.5>");
> Please try:
>
> FileObject fo = fsm.resolveFile("sftp://domain\\user:password@10.10.10.5
> <ma...@10.10.10.5>");
>
>
> Ciao,
> Mario
>
>