Hobione's Weblog

Living & Breathing in Web 2.0 Era

RSA premaster secret error

I wrote how to use SSL connection string using JDBC driver in my previous blog. I deployed the code on the Unix server from Windows 7 pc and I got RSA premaster secret error.

Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available

I figured it out after banging my head on the wall for couple of days. I had to explicitly use sunjce_provider.jar file name on the class path.

$JAVA_HOME/bin/java -Xms64m -Xmx256m -Djava.ext.dirs=.:$SURVEY_LIB -cp .:$JAVA_HOME/jre/lib/ext/sunjce_provider.jar:$CLASSPATH:$SURVEY_BIN/surveys.jar com.hobi.survey.SurveyMainClass getAllSurveys


August 29, 2014 Posted by | SSL | Leave a comment