MS SQL Server Datasource Test Connection Failed
Issue
-
Test connection with
MS SQL
Server datasource failed with the following steps taken:-
Use of
MS SQL
DB Driver downloaded from Download Microsoft JDBC Driver for SQL Server site -
Following the steps to set up module, JDBC and datasource as instructed in JBoss EAP Configuration Guide to set up datasource for MS SQL Server.
The following appeared in server.log:
-
22-06-08 10:24:26,455 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (management-handler-thread - 1) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable to create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:345)
...
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Ř°ʵ{¦¡µLªk¨ϥΦw¥þ³q°Tºݼh (SSL) ¥[±K«إP SQL Server ªº¦w¥þ³s±µ¡C¿ù»~: "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"¡C ClientConnectionId:f5385f37-7fb4-4ca5-9c36-aabe29554c01
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:3680)
...
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
...
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
...
2022-06-08 10:24:26,458 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("test-connection-in-pool") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "MSSQLDS")
]) - failure description: "WFLYJCA0040: failed to invoke operation: WFLYJCA0047: Connection is not valid"
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.