当前位置:   article > 正文

java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation

java.security.nosuchalgorithmexception: error constructing implementation (a

JAVA中调用思科的IP电话时 生产环境报异常:

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

意思是要导入证书, 但是经过证书导入到Linux环境中后,却报这个异常:

java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
    at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:198)
    at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:205)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

意思是导入证书有问题,或者是未寻找到证书.

辗转反侧:最后在stack overflow 中找到一篇文档: 让https 在执行Axis时进行忽略证书的认证:程序之前加入下面一行代码:

AxisProperties.setProperty(“axis.socketSecureFactory”,“org.apache.axis.components.net.SunFakeTrustSocketFactory”);
部署 ,成功呼起IP电话.困扰几天的问题终于解决了.

转载至https://stackoverflow.com/questions/10913185/ignore-certification-authentication-on-axis-client-for-wcf-service

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/570630
推荐阅读
相关标签
  

闽ICP备14008679号