0

So I am using the following

Jmeter 5.5
Java 17.0.2
mssql-jdbc-11.2.0.jre18.jar

The jar has been installed to the JMeter/lib folder

In the JMeter JDBC Connection Configuration

Database URL is like this: jdbc:sqlserver://xx-xxxxxxxx;DatabaseName=xxxxxx
JDBC driver class is: com.mircrosoft.sqlserver.jdbc.SQLServerDriver
Username and password are valid

When I run the test all I get is this:

Response message:java.sql.SQLException: Cannot load JDBC driver class 'com.mircrosoft.sqlserver.jdbc.SQLServerDriver'

The SQL Server is version 15.0.4223

Any ideas please

Kev
  • 121
  • 3
  • 20
  • Are you trying to use a library for Java 18 in a Java 17 jvm? That won't load... – The Impaler Aug 23 '22 at 16:01
  • 1
    Either upgrade to java 18 (I would NOT do this) or downgrade the JDBC driver to java 17 (most likely a solution). – The Impaler Aug 23 '22 at 16:02
  • Good point, so now I have placed mssql-jdbc-11.2.0.jre17.jar in the lib folder and removed the other jar. After restarting JMeter and trying again I still get the same error – Kev Aug 23 '22 at 16:14
  • 1
    Did you copy the JDBC driver into `/lib`? That should be enough. Now, I see a misspelling in the driver name, right there in the error message. `mircrosoft` --> `microsoft` maybe? – The Impaler Aug 23 '22 at 17:42
  • Thanks, it was the spelling, oops – Kev Aug 23 '22 at 21:07

1 Answers1

1

You have a typo, the driver class name should be:

com.microsoft.sqlserver.jdbc.SQLServerDriver

and the Validation Query should be select 1

More information: How to use Different JDBC Drivers

Dmitri T
  • 159,985
  • 5
  • 83
  • 133