添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”。 ClientConnectionId:54e7d01d-ffd4-4eed-ae10-77f70ba1ac28] with root cause

springboot+mybatis+sqlserver进行开发时遇到下列问题:

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”。 ClientConnectionId:54e7d01d-ffd4-4eed-ae10-77f70ba1ac28] with root cause

网上搜索,看到其他博主在官网找到解决方案,地址:

​https://blogs.msdn.microsoft.com/dataaccesstechnologies/2016/11/30/intermittent-jdbc-connectivity-issue-the-driver-could-not-establish-a-secure-connection-to-sql-server-by-using-secure-sockets-layer-ssl-encryption-error-sql-server-returned-an-incomplete-respons/ ​

看到“ 该问题仅在使用低于 4.2 版的旧 JDBC 驱动程序时才会出现。”

那就试一下吧。将pom.xml中的依赖注释掉:

<dependency>   <groupId>com.microsoft.sqlserver</groupId>   <artifactId>mssql-jdbc</artifactId>   <scope>runtime</scope></dependency>

重新添加依赖:

<dependency>   <groupId>com.microsoft.sqlserver</groupId>   <artifactId>mssql-jdbc</artifactId>   <version>8.1.0.jre8-preview</version></dependency>

问题完美解决!!!


java:驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接:“The server selected protocol version TLS10 is not a

jdk1.8的较高版本有些设置做了调整,修改%JAVA_HOME%/jre/lib/security/java.security。题目限制了字数,完整错误是这样

关于Java访问SQL server的错误:The server selected protocol version TLS10 is not accepted by client preferences [TLS12]及安全套接字层(SSL)加密与 SQL Server 建立安全连接

关于Java访问SQL server的错误:

java 读取分割csv文件路径 java 读取csv文件内容

什么是.csv文件,就是最简单的数据库文件;一般里面存储的数据库少的话可以用excel或者是text打开 首先我的csv文件里面的内容如下,我用excel表格打开的1、java怎么读取.csv文件里的所有内容代码如下package cn.com.csv; import java.io.BufferedReader; import java.io.File; import java.io

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”。 ClientConnectionId:54e7d01d-ffd4-4eed-ae10-77f70ba1ac28] with root cause