即使我已经获得了安全证书,但我仍收到SSL握手异常,并且还对Tomcat的server.xml文件进行了更改以支持TLSv1.2。连接数据库时,我收到此错误?任何帮助将不胜感激。
Java版本:1.7.0 Tomcat版本:7.0 .keystore
密钥位于默认文件夹C:/ user /...
server.xml
<Connector SSLEnabled="true" clientAuth="false" maxThreads="150" port="8443"
protocol="HTTP/1.1" scheme="https" secure="true" sslEnabledProtocols="TLSv1.2"/>
例外
2019-05-28 09:39:13.795 [http-bio-8006-exec-10] ERROR DASWebLog
-LogHandler -Could not get JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed. ClientConnectionId:8ef975f4-a5a5-4935-8f2e-b0003549d34e".
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed. ClientConnectionId:8ef975f4-a5a5-4935-8f2e-b0003549d34e".
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) ~[spring-jdbc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:630) ~[spring-jdbc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:695) ~[spring-jdbc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:722) ~[spring-jdbc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:772) ~[spring-jdbc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:192) ~[spring-jdbc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:199) ~[spring-jdbc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at com.mercuryinsurance.das.dao.SnapshotDao.getSnapshotHistoryList(SnapshotDao.java:584) ~[DASDataService-0.0.1-SNAPSHOT.jar:na]
at com.mercuryinsurance.das.service.SnapshotService.getSnapshotHistoryList(SnapshotService.java:395) [DASDataService-0.0.1-SNAPSHOT.jar:na]
at com.mercuryinsurance.das.web.handler.DasWebHandler.getSnapshotHistoryList(DasWebHandler.java:235) [DasWebHandler.class:na]
at com.mercuryinsurance.das.web.bean.DasManagedBean.getSnapshotHistoryList(DasManagedBean.java:849) [DasManagedBean.class:na]
at com.mercuryinsurance.das.web.bean.DasManagedBean.menuSnapshot(DasManagedBean.java:455) [DasManagedBean.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_80]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_80]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_80]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_80]
at org.apache.el.parser.AstValue.invoke(AstValue.java:278) [jasper-el.jar:7.0.47]
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274) [jasper-el.jar:7.0.47]
at org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96) [myfaces-bundle-2.2.8.jar:2.2.8]
at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:86) [myfaces-api-2.2.8.jar:2.2.8]
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:48) [myfaces-api-2.2.8.jar:2.2.8]
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:428) [myfaces-api-2.2.8.jar:2.2.8]
at javax.faces.component.UICommand.broadcast(UICommand.java:103) [myfaces-api-2.2.8.jar:2.2.8]
at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1172) [myfaces-api-2.2.8.jar:2.2.8]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:365) [myfaces-api-2.2.8.jar:2.2.8]
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1658) [myfaces-api-2.2.8.jar:2.2.8]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:862) [myfaces-api-2.2.8.jar:2.2.8]
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:42) [myfaces-bundle-2.2.8.jar:2.2.8]
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196) [myfaces-bundle-2.2.8.jar:2.2.8]
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143) [myfaces-bundle-2.2.8.jar:2.2.8]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198) [myfaces-api-2.2.8.jar:2.2.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.47]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.47]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) [tomcat7-websocket.jar:7.0.47]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.47]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.47]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.47]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [catalina.jar:7.0.47]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:7.0.47]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.47]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [catalina.jar:7.0.47]
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) [catalina.jar:7.0.47]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.47]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.47]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) [tomcat-coyote.jar:7.0.47]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) [tomcat-coyote.jar:7.0.47]
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) [tomcat-coyote.jar:7.0.47]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]