Hi my fellow JMeter users,
I am having trouble connecting to MS SQL server DB, I wonder if I can get some
pointers?
JDBC Driver class: com/Microsoft.sqlserverjdbc.SQLServerDriver.Driver was
downloaded from Microsoft site and the jar file copied to JMeter’slib dir.
1. Initial Error when using Database URL:
jdbc:sqlserver://${DatabaseServer};databaseName=${DatabaseName};
java.sql.SQLException: Cannot createPoolableConnectionFactory (The driver could
not establish a secure connectionto SQL Server by using Secure Sockets Layer
(SSL) encryption. Error: "sun.security.validator.ValidatorException: PKIXpath
building failed:sun.security.provider.certpath.SunCertPathBuilderException:
unable to findvalid certification path to requested
target".ClientConnectionId:f5802381-3429-45d2-830d-8b64a44c1f44)
2. Database URL based on a MS article
(https://techcommunity.microsoft.com/t5/azure-database-support-blog/pkix-path-building-failed-unable-to-find-valid-certification/ba-p/2591304):
jdbc:sqlserver://${DatabaseServer};databaseName=${DatabaseName};trustServerCertificate=false;trustStore="C:\Program
Files
(x86)\Java\jre1.8.0_333\lib\security\cacerts";trustStorePassword=changeit;
java.sql.SQLException: Cannot createPoolableConnectionFactory (The driver could
not establish a secure connectionto SQL Server by using Secure Sockets Layer
(SSL) encryption. Error: "java.lang.RuntimeException: Unexpected error:
java.security.InvalidAlgorithmParameterException:the trustAnchors parameter
must be non-empty".ClientConnectionId:147ec91d-1b27-4073-9306-61c2fe934840)
I made sure the trustStore path in the URL was correct and cacerts was valid.
In both cases, I provided the username and password for the JDBC Connection
Configuration.
I have tried many things I found on the Internet regarding the error in the 2nd
scenario but none worked.
Appreciate any input.
Jun