解决PKIX:unable to find valid certification path to requested target 的问题
来源:互联网 发布:mac root 空密码登录 编辑:程序博客网 时间:2024/06/08 08:18
今天安装了公司的数字证书,用 myeclipse 调试程序时,出现错误:
解决PKIX:unable to find valid certification path to requested target 的问题
根据错误消息看,貌似是找不到数字证书。可奇怪的是数字证书我已经导入了啊,为何还出现这样的情况了。可能的原因:
一、公钥是否正确?是否是网站出来的公钥?
如何从网站导出公钥,参见: http://blog.csdn.net/faye0412/article/details/6883879
二、如何导入的公钥?导入到哪儿呢?
仔细想想看:使用如下命令导入公钥:
keytool -
import
-file d:\Server.cer -keystore
"%JAVA_HOME%\jre\lib\security\cacerts"
-alias server
将公钥导入到了 %JAVA_HOME%\jre\lib\security\cacerts 文件中。
使用如下命令可以看到结果:
keytool -list -keystore
"%JAVA_HOME%\jre\lib\security\cacerts"
| findstr /i server
如果看到红色框内容,就说明的确导入成功了。
那为何 myeclipse 不承认呢?
三、环境不一致?
再想想应用程序的启动过程,通过 myeclipse 启动 tomcat,进行浏览的。而 myeclipse / tomcat 都基于 java ,而 myeclipse 有自带的 jdk ,启动时会不会是使用了 myeclipse 的jdk,而不是 %JAVA_HOME% 目录下的呢?检查之:
myeclipse -> windows -> preferences -> tomcat -> jdk
看到下拉框后,我恍然大悟,哈哈,myeclipse 启动tomcat 时,用的是 Sun JDK 1.6.0_13 ,而不是 jdk1.6.0_43(%JAVA_HOME% 指向的jdk目录)
ok,找到问题就好说了,果断选择 jdk1.6._43 ,重启 tomcat
bingo!
原文地址:http://www.cnblogs.com/AloneSword/p/3244434.html
- 解决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 的问题
- 解决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: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 的问题
- IOS 视屏功能研究
- 10个重要的Linux ps命令实战
- hnust
- jQuery插件之ajaxFileUpload
- java中while与do-while的选择与应用
- 解决PKIX:unable to find valid certification path to requested target 的问题
- es 模板demo
- 常用正则表达式
- 继承(一)
- uboot phy移植心得(基于hi3531A平台)
- [scikit-learn] 特征二值化编码函数的一些坑
- jquery实现web页面樱花坠落的特效(很浪漫哟)
- zabbix 报警的返回值
- guidance使用方式问题