top of page

JDBC Request: Cannot load JDBC driver class’com.mysql.jdbc.Driver’ solution

Writer: kyle Hailey
kyle Hailey
Jun 22, 2022
1 min read

Just  quick post to document a troublesome error when running Jmeter on Mysql



JDBC Request: Cannot load JDBC driver class’com.mysql.jdbc.Driver’ solution

Should be pretty simple, it’s just a question of putting the mysql-connector-java jar file, available at https://dev.mysql.com/downloads/connector/j/, into the classpath for Jmeter. The easiest way for me is to put this into the jmx file:

<stringProp name=“TestPlan.user_define_classpath”> /Users/kyle.hailey/jars/mysql-connector-java-8.0.29.jar,/home/ec2-user/jars/mysql-connector-java-8.0.29.jar</stringProp>

Notice there is a space ” ” before the first jar file.  Apparently the space  was enough to cause the error. After removing the space , jmeter connected successfully to mysql.

 
 
 

1 Comment


cellesim
Sep 10

This article provides a valuable insight into resolving the 'Cannot load JDBC driver class’com.mysql.jdbc.Driver’ error, particularly highlighting the impact of a seemingly minor detail like a leading space in the `TestPlan.user_define_classpath`. Addressing such specific configuration challenges is crucial for reliable Jmeter setups. For those seeking comprehensive solutions to manage database performance testing environments effectively and avoid these common pitfalls, https://cellesim.com/ offers advanced tools and streamlined processes designed to ensure robust connectivity and testing reliability.

Like

Kyle Hailey

  • Facebook
  • Twitter
  • LinkedIn
  • Instagram

San Franisco, Ca 94131

415-341-3430  (please text initially before calling)

bottom of page