I am getting the following exception when calling Session.connect:

com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 2 bad client public DH value

I am trying to use JSch in a commercial product called webMethods Integration Server. The same code works when running in a standalone Java program, but it does not work in webMethods. I suspect it has something to do with the Entrust JCE provider which webMethods uses.

How does JSch uses JCE and can I force it to use a particular provider rather the the default one? I'm willing to change some of the code myself to work around the problem.

Here is the full stack trace:

com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 2 bad client public DH value 
at com.jcraft.jsch.Session.read(Unknown Source)
at com.jcraft.jsch.Session.connect(Unknown Source)
at CLSA.Tools.JSch.Sftp.getSession(Sftp.java:178)
at CLSA.Tools.JSch.Sftp.ftpGet(Sftp.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:287)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:565)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:221)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:194)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:390)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:486)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:359)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:97)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:167)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:298)
at com.wm.util.pool.PooledThread.run(PooledThread.java:105)
at java.lang.Thread.run(Thread.java:534)