解决PKIX:unable to find valid certification path to requested target 的问题
来源:互联网 发布:mac双系统文件共享 编辑:程序博客网 时间:2024/06/08 06:03
今天安装了公司的数字证书,用 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
- 解决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 的问题
- 编写Java程序输出原矩阵和逆矩阵
- Array 函数
- SGISTL源码探究-list容器(下)
- [2017百度之星程序设计大赛
- 阙值,阈值,阀值,傻傻分不清
- 解决PKIX:unable to find valid certification path to requested target 的问题
- java web请求url获取json数据获取value值
- C++学习-STL容器
- 应用级联CNN的人脸检测--笔记
- OpenCV代码精妙之三 实现点集元素之间最小距离
- java中从键盘输入的三种方法
- 频率论学派(传统数理统计学)和贝叶斯统计学比较
- nyoj88汉诺塔一(快速幂)
- The study of slice in Python(20170911)