"nested exception is org.apache.ibatis.exceptions.persistenceexception: \r\n### error querying database. cause: org.springframework.jdbc.cannotgetjdbcconnectionexception: failed to obtain jdbc connection; nested exception is com.microsoft.sqlserver.jdbc.sqlserverexception: “encrypt”属性设置为“false”且 “trustservercertificate”属性设置为“true”,但驱动程序无法使用安全套接字层 (ssl) 加密与 sql server 建立安全连接:错误:the server selected protocol version tls10 is not accepted by client preferences [tls12]。 clientconnectionid:ec54cc45-3


这个错误通常表示在与数据库进行连接时出现了问题。主要原因可能是以下几点: 1. SSL 配置不匹配:客户端(应用程序)期望使用 TLS 1.2 进行安全连接,但服务器选择的协议版本是 TLS 1.0,而客户端不接受。 2. 数据库连接配置错误:可能是关于加密、信任服务器证书等属性的设置不正确。 要解决这个问题,您可以尝试以下几个步骤: 1. 确保数据库服务器支持并正确配置了 TLS 1.2 协议。 2. 检查您的数据库连接配置,特别是与加密和证书相关的设置,确保它们与数据库服务器的实际配置相匹配。 3. 确认您使用的数据库驱动程序是最新版本,以支持正确的 SSL 协议版本。 如果问题仍然存在,可能需要进一步查看数据库服务器和应用程序的详细配置以及相关的日志信息来确定具体的问题所在。 [2024-09-04 19:14:42 | AI写代码神器 | 205点数解答]
相关提问
- "nested exception is org.apache.ibatis.exceptions.persistenceexception: \r\n### error querying database. cause: org.springframework.jdbc.cannotgetjdbcconnectionexception: failed to obtain jdbc connection; nested exception is com.microsoft.sqlserver.jdbc.sqlserverexception: “encrypt”属性设置为“false”且 “trustservercertificate”属性设置为“true”,但驱动程序无法使用安全套接字层 (ssl) 加密与 sql server 建立安全连接:错误:the server selected protocol version tls10 is not accepted by client preferences [tls12]。 clientconnectionid:ec54cc45-3(205点数解答 | 2024-09-04 19:14:42)288
- 驱动程序无法通过使用安全套接字层(ssl)加密与 sql server 建立安全连接。错误:“the server selected protocol version tls10 is not accepted by client preferences [tls13, tls12]”。 clientconnectionid:242d1aa9-cde2-43fb-84ab-3eecfbda8edf" 是什么意思(149点数解答 | 2024-09-05 09:01:11)204
- slave: # 从数据源开关/默认关闭 enabled: true type: com.alibaba.druid.pool.druiddatasource driver-class-name: com.microsoft.sqlserver.jdbc.sqlserverdriver url: jdbc:sqlserver://192.168.1.200:1433;database=waterdangerdb;selectmethod=cursor;encrypt=false;trustservercertificate=true username: sa password: jakj1! 我是这样写的 目标服务器是sql server 2008 这个改不了 我在本地使用连接是没问题的 但是用mavan打成jar包放到服务器上 就连接不上了(222点数解答 | 2024-09-05 10:16:03)187
- cause: org.springframework.jdbc.cannotgetjdbcconnectionexception: failed to obtain jdbc connection; nested exception is com.alibaba.druid.pool.getconnectiontimeoutexception: wait millis 6045, active 25, maxactive 700, creating 1, createelapsemillis 29424,(406点数解答 | 2024-03-06 11:24:40)237
- cause: org.springframework.jdbc.cannotgetjdbcconnectionexception: failed to obtain jdbc connection; nested exception is com.alibaba.druid.pool.getconnectiontimeoutexception: wait millis 6045, active 25, maxactive 700, creating 1, createelapsemillis 29424,(365点数解答 | 2024-03-06 11:26:40)251
- cause: org.springframework.jdbc.cannotgetjdbcconnectionexception: failed to obtain jdbc connection; nested exception is com.alibaba.druid.pool.getconnectiontimeoutexception: wait millis 6045, active 25, maxactive 700, creating 1, createelapsemillis 29 中文回答(279点数解答 | 2024-03-06 11:26:54)242
- [datax-web, admin jobfailmonitorhelper] error c.w.d.a.c.t.jobfailmonitorhelper - >>>>>>>>>>> datax-web, job fail alarm email send error, joblogid:23 org.springframework.mail.mailsendexception: mail server connection failed; nested exception is javax.mail.messagingexception: could not connect to **tp host: smtp.qiye.aliyun.com, port: 465, response: -1. failed messages: javax.mail.messagingexception: could not connect to **tp host: smtp.qiye.aliyun.com, port: 465, response: -1(345点数解答 | 2024-01-29 15:37:59)306
- org.springframework.beans.factory.beandefinitionstoreexception: failed to process import candidates for configuration class [com.y3cs.springaopapplication]; nested exception is java.io.filenotfoundexception: class path resource [org/springframework/security/config/annotation/authentication/configurers/globalauthenticationconfigureradapter.class] cannot be opened because it does not exist at org.springframework.context.annotation.configurationclassparser.processimports(configurationclassparser.j(184点数解答 | 2024-07-15 14:46:02)206
- 添加了依赖还是报错org.springframework.beans.factory.beandefinitionstoreexception: failed to process import candidates for configuration class [com.y3cs.springaopapplication]; nested exception is java.io.filenotfoundexception: class path resource [org/springframework/security/config/annotation/authentication/configurers/globalauthenticationconfigureradapter.class] cannot be opened because it does not exist at org.springframework.context.annotation.configurationclassparser.processimports(configurationclas(198点数解答 | 2024-07-15 14:46:23)188
- dm.jdbc.driver.dmexception: 数据溢出 at dm.jdbc.driver.dberror.throwexception(dberror.java:636) at dm.jdbc.c.b.p.s(msg.java:225) at dm.jdbc.c.b.p.p(msg.java:185) at dm.jdbc.c.b.p.o(msg.java:166) at dm.jdbc.c.a.a(dbaccess.java:776) at dm.jdbc.c.a.a(dbaccess.java:327) at dm.jdbc.c.a.a(dbaccess.java:435) at dm.jdbc.driver.dmdbpreparedstatement.executeinner(dmdbpreparedstatement.java:284) at dm.jdbc.driver.dmdbpreparedstatement.do_executequery(dmdbpreparedstatement.java:383) at dm.jdbc.driver.(598点数解答 | 2024-10-15 15:48:38)204
- 问题排查:dm.jdbc.driver.dmexception: 数据溢出 at dm.jdbc.driver.dberror.throwexception(dberror.java:636) at dm.jdbc.c.b.p.s(msg.java:225) at dm.jdbc.c.b.p.p(msg.java:185) at dm.jdbc.c.b.p.o(msg.java:166) at dm.jdbc.c.a.a(dbaccess.java:776) at dm.jdbc.c.a.a(dbaccess.java:327) at dm.jdbc.c.a.a(dbaccess.java:435) at dm.jdbc.driver.dmdbpreparedstatement.executeinner(dmdbpreparedstatement.java:284) at dm.jdbc.driver.dmdbpreparedstatement.do_executequery(dmdbpreparedstatement.java:383) at dm.jdbc.dr(403点数解答 | 2024-10-15 15:48:41)866
- org.springframework.beans.factory.beandefinitionstoreexception: failed to process import candidates for configuration class [com.y3cs.springaopapplication]; nested exception is java.io.filenotfoundexception: class path resource [org/springframework/security/config/annotation/authentication/configurers/globalauthenticationconfigureradapter.class] cannot be opened because it does not exist(182点数解答 | 2024-07-15 14:44:58)231