解决PKIX:unable to find valid certification path to requested target 的问题
2017-09-12 13:01
921 查看
今天安装了公司的数字证书,用 myeclipse 调试程序时,出现错误:
解决PKIX:unable to find valid certification path to requested target 的问题
根据错误消息看,貌似是找不到数字证书。可奇怪的是数字证书我已经导入了啊,为何还出现这样的情况了。可能的原因:
一、公钥是否正确?是否是网站出来的公钥?
如何从网站导出公钥,参见: http://blog.csdn.net/faye0412/article/details/6883879
二、如何导入的公钥?导入到哪儿呢?
仔细想想看:使用如下命令导入公钥:
将公钥导入到了 %JAVA_HOME%\jre\lib\security\cacerts 文件中。
使用如下命令可以看到结果:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/14/27ad30b7ddae42cc1594604212d3c23c.png)
如果看到红色框内容,就说明的确导入成功了。
那为何 myeclipse 不承认呢?
三、环境不一致?
再想想应用程序的启动过程,通过 myeclipse 启动 tomcat,进行浏览的。而 myeclipse / tomcat 都基于 java ,而 myeclipse 有自带的 jdk ,启动时会不会是使用了 myeclipse 的jdk,而不是 %JAVA_HOME% 目录下的呢?检查之:
myeclipse -> windows -> preferences -> tomcat -> jdk
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/14/09ce84432b79ef418b1e235b8abd8e77.png)
看到下拉框后,我恍然大悟,哈哈,myeclipse 启动tomcat 时,用的是 Sun JDK 1.6.0_13 ,而不是 jdk1.6.0_43(%JAVA_HOME% 指向的jdk目录)
ok,找到问题就好说了,果断选择 jdk1.6._43 ,重启 tomcat
解决PKIX:unable to find valid certification path to requested target 的问题
根据错误消息看,貌似是找不到数字证书。可奇怪的是数字证书我已经导入了啊,为何还出现这样的情况了。可能的原因:
一、公钥是否正确?是否是网站出来的公钥?
如何从网站导出公钥,参见: http://blog.csdn.net/faye0412/article/details/6883879
二、如何导入的公钥?导入到哪儿呢?
仔细想想看:使用如下命令导入公钥:
使用如下命令可以看到结果:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/14/27ad30b7ddae42cc1594604212d3c23c.png)
如果看到红色框内容,就说明的确导入成功了。
那为何 myeclipse 不承认呢?
三、环境不一致?
再想想应用程序的启动过程,通过 myeclipse 启动 tomcat,进行浏览的。而 myeclipse / tomcat 都基于 java ,而 myeclipse 有自带的 jdk ,启动时会不会是使用了 myeclipse 的jdk,而不是 %JAVA_HOME% 目录下的呢?检查之:
myeclipse -> windows -> preferences -> tomcat -> jdk
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/14/09ce84432b79ef418b1e235b8abd8e77.png)
看到下拉框后,我恍然大悟,哈哈,myeclipse 启动tomcat 时,用的是 Sun JDK 1.6.0_13 ,而不是 jdk1.6.0_43(%JAVA_HOME% 指向的jdk目录)
ok,找到问题就好说了,果断选择 jdk1.6._43 ,重启 tomcat
相关文章推荐
- 解决PKIX问题:unable to find valid certification path to requested target
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX问题:unable to find valid certification path to requested target【X509TrustManager】
- 解决PKIX问题:unable to find valid certification path to requested target
- 解决PKIX问题:unable to find valid certification path to requested target
- 解决PKIX问题:unable to find valid certification path to requested target【X509TrustManager】
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX path building failed的问题unable to find valid certification path to requested target
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题
- 解决PKIX:unable to find valid certification path to requested target 的问题