title: SSL IOExceptionjavax.net.ssl.SSLKeyException: RSA premaster secret error
body: <p>We have a proprietary software to run the load testing. When I try to run the tool, I am getting the following exception in my logs. I am running out of ideas how to resolve it. I seen most of the answers and they got it working uninstalling and installing the java and setting the classpath in the command line while running the application . I tried those work around, but still no luck. </p>
  
  <p>Java version: JDK 1.6.0_24</p>
  
  <p>Already tried the answers mentioned in this forum,</p>
  
  <p><a href="https://stackoverflow.com/questions/15985625/ssl-error-rsa-premaster-secret-error">Click here</a></p>
  
  <pre><code>C:\lt&gt;"C:\Program Files\Java\jdk1.6.0_24"\bin\java -Djava.class.path="C:/lt/lib/base12.jar;C:/lt/lib/cldcapi11.jar;C:/lt/lib/commons-codec-1.3.jar;C:/lt/lib/commons-dbcp-1.1.jar;C:/lt/lib/commons-pool-1.1.jar;C:/lt/lib/com_dexterra_platform_midp_base.jar;C:/lt/lib/incubator-activemq-4.1.jar;C:/lt/lib/jargs.jar;C:/lt/lib/javassist-3.12.0.GA.jar;C:/lt/lib/javax.jms.jar;C:/lt/lib/joda-time-1.6.jar;C:/lt/lib/log4j-extension.jar;C:/lt/lib/log4j.jar;C:/lt/lib/messaging-base12.jar;C:/lt/lib/midpapi20.jar;C:/lt/lib/spring-1.2.6.jar;C:/lt/lib/tstdevice12.jar;C:/lt/lib/wma20.jar;C:/lt/lib/xbean-spring-2.2.jar;C:/lt/lib/lt.jar;C:/lt/lib/test.jar;C:/lt/lib/jsr75.jar""-Dtestclient.cfg.file=lib\TestClientConfig.xml"  -DNUM_CLIENTS=2 -DCLIENT_START_ID=0 -DSTART_DELAY=0 -DUSERS_FILE=C:/lt/xmlapitool/bin/newsubscribers.csv-Djava.ext.dirs=lib  -classpath "C:\Program Files\Java\jdk1.6.0_24\lib\ext\*" -jar TestDevice.jar -t data -a ConfigurableApp -n -b -d psr -p password -u psr -s KickOff
  </code></pre>
  
  <p>Any help is greatly appreciated!</p>
  
  <pre><code>Wed Oct 16 15:59:22 MDT 2013 ERROR [main-tstdevice-0] SSL IOExceptionjavax.net.ssl.SSLKeyException: RSA premaster secret error
  Terminate client due to exception: javax.net.ssl.SSLKeyException: RSA premaster secret error
      at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.&lt;init&gt;(RSAClientKeyExchange.java:97)
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:744)
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:238)
      at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
      at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:632)
      at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
      at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:73)
      at java.io.DataOutputStream.writeShort(DataOutputStream.java:150)
      at com.octanewave.platform.messaging.OW_SSLLoginRequest.writeTo(OW_SSLLoginRequest.java:174)
      at com.octanewave.platform.SystemManagerBase.login(SystemManagerBase.java:865)
      at com.octanewave.platform.OW_DeviceSecurityManager.login(OW_DeviceSecurityManager.java:786)
      at com.octanewave.platform.ApplicationStartupBase.run(ApplicationStartupBase.java:268)
      at com.octanewave.test.midp.TestClient.run(TestClient.java:779)
      at com.octanewave.test.midp.TestClient.runClient(TestClient.java:441)
      at com.octanewave.test.midp.TestClient.main(TestClient.java:266)
      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:597)
      at javassist.Loader.run(Loader.java:290)
      at com.octanewave.test.midp.TestClient$1.run(TestClient.java:341)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
  Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
      at javax.crypto.KeyGenerator.&lt;init&gt;(DashoA13*..)
      at javax.crypto.KeyGenerator.getInstance(DashoA13*..)
      at com.sun.net.ssl.internal.ssl.JsseJce.getKeyGenerator(JsseJce.java:223)
      at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.&lt;init&gt;(RSAClientKeyExchange.java:89)
      ... 26 more 
  </code></pre>
  
  <p>Let me know, if you need any more details.</p>
  
  <p>Thanks,
  Ramesh</p>