httpClient访问webservice 异常the trustAnchors parameter must be non-empty
Unexpected error:
java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
代码如下:
if (postUrlString.startsWith("https:")) {
System.setProperty("javax.net.ssl.keyStore","D:\\certi\\server.ks");
System.setProperty("javax.net.ssl.keyStorePassword","accident");
System.setProperty("javax.net.ssl.trustStore",path);
System.setProperty("javax.net.ssl.trustStorePassword",password);
}
------解决方案--------------------
trustAnchors参数必须非空,你看一下你哪个参数是空的。
------解决方案--------------------
不知道说什么