javax.net.ssl.SSLKeyException: RSA premaster secret error

正常:

idea 环境下,没有进行配置文件,jar分离,直接打成jar包,

到linux上运行,java -jar 正常


错误的:

在进行配置文件分离之后,在服务器上进行https请求的时候报错:

javax.net.ssl.SSLKeyException: RSA premaster secret error

我的解决办法:从本地\jre\lib\ext文件中取sunjce_provider.jar包,放到libs内,问题解决

注:libs是存放jar的文件夹

参考:https://blog.csdn.net/xuzhuang2008/article/details/43306111

阅读更多

求教::错误:“RSA premaster secret error”。

04-16

希望知道的指点一下,谢谢!!!rnERROR 2010-04-16 21:16:54,953 JDBCExceptionReporter:logExceptions - 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“RSA premaster secret error”。rn[Hibernate]: WARN 2010-04-16 21:16:55,125 SettingsFactory:buildSettings - Could not obtain connection metadatarncom.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“RSA premaster secret error”。rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)rn at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1412)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1058)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)rn at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)rn at java.sql.DriverManager.getConnection(DriverManager.java:525)rn at java.sql.DriverManager.getConnection(DriverManager.java:140)rn at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291)rn at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277)rn at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259)rn at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:240)rn at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)rn at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)rn at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1175)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1073)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:835)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1073)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:835)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:279)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360)rn at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:355)rn at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:296)rn at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)rn at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)rn at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)rn at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1117)rn at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1215)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)rn at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)rn at java.lang.Thread.run(Thread.java:595)rnCaused by: javax.net.ssl.SSLKeyException: RSA premaster secret errorrn at com.sun.net.ssl.internal.ssl.PreMasterSecret.(PreMasterSecret.java:86)rn at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:515)rn at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:160)rn at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)rn at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:818)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1057)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1041)rn at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1379)rn ... 63 morern

没有更多推荐了,返回首页