forked from chanjarster/weixin-java-tools
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https问题PKIX path building failed #8
Comments
binarywang
pushed a commit
that referenced
this issue
Dec 9, 2016
请问这个问题解决了吗?我替换了JCE无限制权限策略文件后还是不行。 |
@izyh 这个问题可能是微信的https证书不在JDK自带的证书库里,试试看用这个项目解决: |
我试了网上的几种方法都不行,干脆重装了jdk,然后就好了。 |
同遇到此问题,重装jdk仍然不管用。个人感觉主要原因就是企业微信所用证书更换了,而java并不认识此证书。
还有就是推荐查看证书的工具:KeyStore Explorer,省的用命令行看了,还可以按照安装时间排序什么的。 我个人情况来说,上面的方法虽然可行,但是经常是一开始报错,多次测试后才会持续一段时间不报错,重打开电脑又会报错,但在其它电脑上没有问题,这台电脑原先动过证书方面的,怀疑电脑证书有问题,感觉如果上述方法也不行,重装系统才是最终解决方法。 目前升级了Win10,大版本升级,从 |
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在使用普通模式发送消息时,只设置了corpid、corpsecret、agentid三个参数:
WxCpInMemoryConfigStorage config = new WxCpInMemoryConfigStorage();
config.setCorpId("..."); // 设置微信企业号的appid
config.setCorpSecret("..."); // 设置微信企业号的app corpSecret
config.setAgentId("0"); // 设置微信企业号应用ID
报错:
Exception in thread "main" java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at me.chanjar.weixin.cp.api.WxCpServiceImpl.getAccessToken(WxCpServiceImpl.java:128)
The text was updated successfully, but these errors were encountered: