`

InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

    博客分类:
  • SSO
 
阅读更多

[org.jasig.cas.client.util.CommonUtils]java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1731)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1692)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1675)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1204)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1181)

at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)

at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)

at org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:326)

at org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:305)

at org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator.retrieveResponseFromServer(AbstractCasProtocolUrlBasedTicketValidator.java:50)

at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:207)

at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:169)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at com.common.core.busi.other.filter.SessionFilter.doFilterInternal(SessionFilter.java:83)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)

at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)

at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)

at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)

at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)

at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)

at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:556)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:267)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:245)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:57)

at sun.security.validator.Validator.getInstance(Validator.java:161)

at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108)

at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:204)

at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)

at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185)

at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136)

at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)

at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:925)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1170)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1197)

... 44 more

Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183)

at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:103)

at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:87)

at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:55)

... 55 more

 

解决方案:

原因是因为当前JDK环境下的证书与sso服务器端tomcat的证书不一致导致,需要重新生成证书,并且导入到 ""%JAVA_HOME%/jre/lib/security/cacerts"中.

重新导入后,登录系统一切正常.

分享到:
评论

相关推荐

    broken-docker-jdk9-cacerts:跟踪问题docker-libraryopenjdk#145

    Ubuntu 18.04,Debian-损坏的Java cacerts文件 ... ... (CA证书是公共信息,只有极少数情况需要将其保密,因为您会意识到非常具体的业务需求。) ... java.security.InvalidAlgorithmParameterException:

    java实现微信小程序加密数据解密算法

    public byte[] decrypt(byte[] content, byte[] keyByte, byte[] ivByte) throws InvalidAlgorithmParameterException { initialize(); try { Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding"); Key...

    java8看不到源码-web-push-java:用于网络推送加密的Java客户端

    java8 看不到源码请改用。 这具有更好的功能兼容性并且更积极地维护:-) ...InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException, InvalidKeyExcepti

    jce_policy用于解决jdk1.6,1.8https调用

    当进行HTTPS调用时,如果遇到“InvalidAlgorithmParameterException”或“IllegalKeySizeException”这类错误,很可能是由于JCE的默认密钥长度限制所致。此时,可以通过替换JCE的政策文件(例如,将`jce_policy-...

    基于Java技术的DES加密解密算法下载

    8. **错误处理**:在实际应用中,需要处理可能的异常,如`NoSuchAlgorithmException`、`InvalidKeyException`、`InvalidAlgorithmParameterException`等。 总的来说,Java中的DES加密解密涉及到许多安全和编程概念...

Global site tag (gtag.js) - Google Analytics