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

June 22nd, 2022

 

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.

 


Uncategorized

  1. Trackbacks

  2. No trackbacks yet.
  1. Comments

  2. Jared Still
    | #1

    I would classify that as a bug.


5 − = zero