Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread lmk

I dont have a DNS server installed, the host cannot be found by name.


Jörg Schaible-2 wrote:
 
 Well,
 
 lmk wrote at Montag, 15. Dezember 2008 11:35:
 
 
 Hi all,
 
 I try vainly to use VFS to connect to SFTP server .
 I do the same as explained on
 http://wiki.apache.org/commons/SimpleSftpFileDownload wiki page
 
 [snip]
 
 Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: x.x.x.x
 at com.jcraft.jsch.Session.checkHost(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at

 org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
 ... 6 more
 
 VFS cannot connect, since the underlaying library (JSch) cannot find the
 host x.x.x.x. Can you try again with the real host name instead of an IP
 address?
 
 - Jörg
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-VFS--SFTP--cannot-connect-to-SFT-server-tp21011512p21013844.html
Sent from the Commons - User mailing list archive at Nabble.com.


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



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread lmk

Actually I have a host name defined on hosts file, but, I cannot ping it 
however.
I can connect to SFTP server with Win SCP, I put the server ip address and
it works ..





lmk wrote:
 
 how can I do that?
 
 
 
 Jörg Schaible-2 wrote:
 
 lmk wrote at Montag, 15. Dezember 2008 14:20:
 
 
 I dont have a DNS server installed, the host cannot be found by name.
 
 Well, you may temporarily add an entry to your local hosts file.
 
 - Jörg
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-VFS--SFTP--cannot-connect-to-SFT-server-tp21011512p21014857.html
Sent from the Commons - User mailing list archive at Nabble.com.


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



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread lmk

I passed to the last version of jcraft I get more explicit exception:

UnknownHostKey: x.x.x.x. RSA key fingerprint is
0d:51:c6:7f:e1:84:5e:37:8b:93:29:bd:d4:d1:ba:79

how can I verify the host key?? 






lmk wrote:
 
 I dont have a DNS server installed, the host cannot be found by name.
 
 
 Jörg Schaible-2 wrote:
 
 Well,
 
 lmk wrote at Montag, 15. Dezember 2008 11:35:
 
 
 Hi all,
 
 I try vainly to use VFS to connect to SFTP server .
 I do the same as explained on
 http://wiki.apache.org/commons/SimpleSftpFileDownload wiki page
 
 [snip]
 
 Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: x.x.x.x
 at com.jcraft.jsch.Session.checkHost(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at

 org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
 ... 6 more
 
 VFS cannot connect, since the underlaying library (JSch) cannot find the
 host x.x.x.x. Can you try again with the real host name instead of an
 IP
 address?
 
 - Jörg
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-VFS--SFTP--cannot-connect-to-SFT-server-tp21011512p21015310.html
Sent from the Commons - User mailing list archive at Nabble.com.


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



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread lmk

I resolve the problem by adding

SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(ops,
no);

thanks..

-- 
View this message in context: 
http://www.nabble.com/-VFS--SFTP--cannot-connect-to-SFT-server-tp21011512p21015554.html
Sent from the Commons - User mailing list archive at Nabble.com.


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



[VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread lmk

Hi all,

I try vainly to use VFS to connect to SFTP server .
I do the same as explained on 
http://wiki.apache.org/commons/SimpleSftpFileDownload wiki page 


here a snippet code

FileSystemManager fsManager =  VFS.getManager();

UserAuthenticator auth = new StaticUserAuthenticator(null,
login,passwd);  
FileSystemOptions  ops = new FileSystemOptions();
try {

DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(ops,auth);

} 
catch (FileSystemException ex) {
 throw new RuntimeException(setUserAuthenticator failed, ex);
 }

 FileObject fss = fsManager.resolveFile(sftp://x.x.x.x/export/home/,ops);


I get the exception:

Exception in thread main org.apache.commons.vfs.FileSystemException: Could
not connect to SFTP server at sftp://x.x.x.x/;.
at
org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:99)
at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:81)
at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:62)
at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:641)
at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:582)
at com.fimat.kb.util.ftp.FTPManager.main(FTPManager.java:181)
Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to
SFTP server at x.x.x.x.
at
org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:214)
at
org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:90)
... 5 more
Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: x.x.x.x
at com.jcraft.jsch.Session.checkHost(Unknown Source)
at com.jcraft.jsch.Session.connect(Unknown Source)
at com.jcraft.jsch.Session.connect(Unknown Source)
at
org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
... 6 more

best regards!
-- 
View this message in context: 
http://www.nabble.com/-VFS--SFTP--cannot-connect-to-SFT-server-tp21011512p21011512.html
Sent from the Commons - User mailing list archive at Nabble.com.


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



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
lmk wrote at Montag, 15. Dezember 2008 15:18:

 
 how can I do that?

http://en.wikipedia.org/wiki/Hosts_file

- Jörg


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



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
lmk wrote at Montag, 15. Dezember 2008 15:33:

 
 Actually I have a host name defined on hosts file, but, I cannot ping it
 however.

Well, that should be possible if the entry in the hosts file is correct and
the hosts file is in use.

 I can connect to SFTP server with Win SCP, I put the server ip address and
 it works ..

- Jörg


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



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
lmk wrote at Montag, 15. Dezember 2008 14:20:

 
 I dont have a DNS server installed, the host cannot be found by name.

Well, you may temporarily add an entry to your local hosts file.

- Jörg


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



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
lmk wrote at Montag, 15. Dezember 2008 15:55:

 
 I passed to the last version of jcraft I get more explicit exception:
 
 UnknownHostKey: x.x.x.x. RSA key fingerprint is
 0d:51:c6:7f:e1:84:5e:37:8b:93:29:bd:d4:d1:ba:79
 
 how can I verify the host key??

OK, this is really something different. Bascially it tells you, that is is
missing the fingerprint in the known_hosts file. Using the command line
you're normally asked on the first connect, wether the fingerprint is
correct or not and you have to confirm this by typing yes.

The same applies more or less to all the Windows tools, but unfortunately
there's abolutely no standard where each tool writes its known_hosts file
and JSch has no idea where it should looking for it. However, the Sftp
connectot has a parameter ...

- Jörg


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



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
Well,

lmk wrote at Montag, 15. Dezember 2008 11:35:

 
 Hi all,
 
 I try vainly to use VFS to connect to SFTP server .
 I do the same as explained on
 http://wiki.apache.org/commons/SimpleSftpFileDownload wiki page

[snip]

 Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: x.x.x.x
 at com.jcraft.jsch.Session.checkHost(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at

org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
 ... 6 more

VFS cannot connect, since the underlaying library (JSch) cannot find the
host x.x.x.x. Can you try again with the real host name instead of an IP
address?

- Jörg


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



[Collections] Transforming Maps and Lists

2008-12-15 Thread Michael

Hi folks,

I'd like to transform both.
E.g. adding strings to a list and let the transformer lowercase them. 
Unfortunately the ListUtils#tranformedList(List, Transformer) 
transformer only when I add elements.


Is there a way to achieve one-time tranformation?

Thanks,

Mike

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



Re: [Collections] Transforming Maps and Lists

2008-12-15 Thread Michael

James Carman wrote:

Have you tried this?

http://commons.apache.org/collections/api-release/org/apache/commons/collections/CollectionUtils.html#transform(java.util.Collection,%20org.apache.commons.collections.Transformer)


No,

I tried 
http://commons.apache.org/collections/api-release/org/apache/commons/collections/ListUtils.html#transformedList(java.util.List,%20org.apache.commons.collections.Transformer)


beause it seems the best thing which it isn't :-(

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



Re: [Collections] Transforming Maps and Lists

2008-12-15 Thread Michael

Michael wrote:

James Carman wrote:

Have you tried this?

http://commons.apache.org/collections/api-release/org/apache/commons/collections/CollectionUtils.html#transform(java.util.Collection,%20org.apache.commons.collections.Transformer) 



No,

I tried 
http://commons.apache.org/collections/api-release/org/apache/commons/collections/ListUtils.html#transformedList(java.util.List,%20org.apache.commons.collections.Transformer) 



beause it seems the best thing which it isn't :-(


EDIT: Your proposed method does!

Unfortunately the Util classed and collection/map classes are not really 
done uniformly :-(
I have to transform a list of maps which contain oracle.sql.TIMESTAMP 
but has to be java.sql.Timestamp since oracle's timestamp is useless in 
JSP and DisplayTag (fmt, comparable).


Thanks

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