java.security.NoSuchAlgorithmException: Error with Netlogo extension

383 views
Skip to first unread message

Samuel Idowu

unread,
Mar 18, 2012, 8:25:07 PM3/18/12
to netlog...@googlegroups.com
I used the Jsch library to tunnel port 3306 through SSH. It works fine when I run from Netbeans (Java jdk). But, When I use it as an extension for Netlogo, I get this error:

Session.connect: java.security.NoSuchAlgorithmException: DH KeyPairGenerator not available

I have tried to swap the netlogo java to the latest version but, it still gives this error.

I guess netlogo couldn't locate the java JCE, because it works fine when I run same code from Netbeans. Can anyone help with this issue?

Snippet:

final JSch jsch = new JSch();                
session = jsch.getSession(st_param.username, st_param.host, st_param.port);
Properties config = new Properties();
config.put("StrictHostKeyChecking", "no");
session.setConfig(config);
session.setPassword(st_param.password);                
LocalUserInfo lui = new LocalUserInfo();                session.setUserInfo(lui);
session.connect(); 


Seth Tisue

unread,
Mar 19, 2012, 5:05:22 PM3/19/12
to netlog...@googlegroups.com
>>>>> "Samuel" == Samuel Idowu <samu...@gmail.com> writes:

Samuel> I used the Jsch library to tunnel port 3306 through SSH. It
Samuel> works fine when I run from Netbeans (Java jdk). But, When I use
Samuel> it as an extension for Netlogo, I get this error:

Samuel> Session.connect: java.security.NoSuchAlgorithmException: DH
Samuel> KeyPairGenerator not available

Try launching NetLogo without the -Djava.ext.dirs= flag, see if the
problem goes away.

(We include that in the default launch flags to prevent system-installed
versions of JOGL from conflicting with the JOGL version bundled with
NetLogo. If you're not using the 3D view, it shouldn't matter.)

--
Seth Tisue | Northwestern University | http://tisue.net
lead developer, NetLogo: http://ccl.northwestern.edu/netlogo/

Samuel Idowu

unread,
Mar 19, 2012, 10:46:57 PM3/19/12
to netlog...@googlegroups.com


On Tuesday, March 20, 2012 6:05:22 AM UTC+9, Seth Tisue wrote:
>>>>> "Samuel" writes:


Hi, 

Launching Netlogo without the -Djava.ext.dirs= flag works. Great!!!

Thanks.  
Reply all
Reply to author
Forward
0 new messages