I encountered an error when my application tries to load a RSA Algorithm provider class from JAVA. The exception stack is as follow:
javax.jms.JMSException:
I've had the same problem after upgrading to new Java version on Mac. My (maven) project ran OK from command line but got the "SunTlsRsaPremasterSecret" error in Eclipse.
The solution was to remove Installed JREs in Eclipse configuration and add them again (using the "Search..." button).
Probable solution: Check if jdk path is set till C:\Program Files\Java\jdk1.8.0_171 but not including bin
I also had this issue, noticed that the problem was in my Eclipse configuration.
Window > Preferences > Java > Installed JREs > jdk8_64bit > Edit...
The path of my sunjce_provider.jar
was pointing to jdk8_64bit\lib\ext\sunjce.provider.jar
. It should point to the JRE's equivalent in jdk8_64bit\jre\lib\ext\sunjce.provider.jar
.
Had to spend almost a day on this while trying to use JavaMail in Eclipse Luna. Tried all approaches suggested in various forums, but no luck.
Digged into the complete flow and found the exception arising due to Class is on BootClassPath
from KeyAgreement.getInstance()->JceSecurity.canUseProvider()->JceSecurity.getVerificationResult()->JarVerifier.verify()
void verify() throws JarException, IOException { if (jarURL == null) { throw new JarException("Class is on the bootclasspath"); }.......
I removed sunjce_provider jar from \ext\ folder and can send mail now. This might not be right but atleast a quick workaround.
Refer Eclipse bug.
It happened to me while launching the tomcat server from eclipse. I solved it by changing the configuration in Windows -> Preferences -> Java -> Installed JREs -> Edit. I had to update all the JRE system libraries with the corresponding jars from the folders in:
It seems that after the last update I have changed the JRE_Home but forgot those libraries.
I know, I am joining late here. But for me, this error came suddenly as soon as I changed the Preference -> Java -> Installed JREs -> Execution Environments as JavaSE-1.8 to jdk1.8 path. But it should be jre1.8 path.
I don't know why is it happening now. But It sorted the problem.