收到致命警报:与Tomcat的handshake_failure

时间:2011-10-21 04:07:08

标签: java tomcat6 sslhandshakeexception

我在Tomcat中使用授权的ssl连接时遇到问题。我开发了使用证书连接到外部服务器的类。我在命令行中运行它时工作正常。但是当我从JSP页面调用它时,Tomcat中的主机抛出异常,如下所示:

  

错误:javax.net.ssl.SSLHandshakeException:收到致命警报:handshake_failure com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)com.sun.net.ssl.internal。 ssl.Alerts.getSSLException(Alerts.java:136)com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1694)com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord( SSLSocketImpl.java:939)com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1120)com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1147) com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1131)sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)sun.net.www.protocol。 https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)wind.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionIm pl.java:234)myPakage.myClass.method(myClass.java:90)org.apache.jsp.jsp.test.tst_jsp._jspService(tst_jsp.java:66)org.apache.jasper.runtime.HttpJspBase.service( HttpJspBase.java:70)javax.servlet.http.HttpServlet.service(httpServlet.java:717)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)org.apache.jasper.servlet.JspServlet。 serviceJspFile(JspServlet.java:313)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.apache.catalina.core。 ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)org.apache。 catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)org.apache.catalina.core.StandardHostValve.invo ke(StandardHostValve.java:127)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)org.apache.catalina。 connector.CoyoteAdapter.service(CoyoteAdapter.java:298)org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:588) org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:489)java.lang.Thread.run(Thread.java:619)   块引用

我已将已经外部服务器的公共证书导入到java home中的cacerts。 Java版本:6.0_21 Tomcat版本:6.0.32

我真的厌倦了这个问题。请帮忙解决这个问题。

1 个答案:

答案 0 :(得分:0)

如果您现在仍有同样的问题,请升级到java 1.6.0_32。有同样的问题,升级后就解决了。