commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Barrett" <JBarr...@sawyermedia.com>
Subject [VFS] sftp problems
Date Wed, 11 Jun 2003 17:33:25 GMT
Howdy,

I'm trying to get the sftp provider to work, but I'm running into problems.

I'm using jdk1.3, jce1.2.2, vfs HEAD, and I've tried jsch 0.1.2 (specified in vfs project.xml)
and 0.1.5 (the most current).  I also tried using jce from bouncycastle (http://www.bouncycastle.org)
to no avail.

I've tried connecting to two different linux servers both running ssh2 is installed on both
machines and I'm able to do a commandline connection using sftp, so I know that works.

I'm trying to get the sftp test case to pass, and that's where the errors are coming from.
 Line 198 in ProviderTestSuite tries to check and see if the test url specified exists.  Eventually
this leads to line 108 in SftpFileSystem, which basically calls Session.connect() on an Sftp
Session.  Everything seems peachy until line 52 in com.jcraft.jsch.jce.DH which looks like
so:

myKpairGen=KeyPairGenerator.getInstance("DH");

This is apparently a java.security.KeyPairGenerator.  This barfs with this message: "DH KeyPairGenerator
not available".  

This exception then leads to other down stream issues resulting in a NPE:

java.lang.NullPointerException
	at com.jcraft.jsch.jce.DH.getE(DH.java:58)
	at com.jcraft.jsch.jce.DHG1.init(DHG1.java:114)
	at com.jcraft.jsch.Session.receive_kexinit(Session.java:379)
	at com.jcraft.jsch.Session.connect(Session.java:246)
	at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:108)
	at org.apache.commons.vfs.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:138)
	at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:106)
	at org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:919)
	at org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:372)
	at org.apache.commons.vfs.test.ProviderTestSuite.setUp(ProviderTestSuite.java:198)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)

Has anyone come across this?  I peeked at the KeyPairGenerator.getInstance() docs, and it
looks like DH isn't a valid option.  This doesn't seem to be an issue for lots of other people
though, a google search reveals lots of code on the net with the line: KeyPairGenerator.getInstance("DH").

thanks,
+jeff

The information in this email and subsequent attachments may contain confidential information
that is intended solely for the attention and use of the named addressee(s). This message
or any part thereof must not be disclosed, copied, distributed, or retained by any person
without the authorization from the addressee.

 

Mime
View raw message