1

I am unable to run jmeter JMX file using gradle task 'jmeterRun' which is having test for database checkpoint. I am getting error message

"Could not return Connection java.sql.SQLException: No suitable driver found" in the jmeter.log file.

Here is my JDBC Connection Configuration: enter image description here

Here is build.gradle:

 apply plugin: 'jmeter'
 apply plugin: 'java'

  dependencies {
 testRuntime "com.oracle:ojdbc6:11.2.0.3"
 }

 buildscript {      

    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "com.github.kulya:jmeter-gradle-plugin:1.3.2-2.9"
        //classpath "com.github.kulya:jmeter-gradle-plugin:1.3.4-2.13"
        classpath "kg.apc:jmeter-plugins:1.1.3"
        classpath "kg.apc:jmeter-plugins-standard:1.1.3"
        classpath "kg.apc:jmeter-plugins-extras:1.1.3"
    }
}

jmeterRun.configure {
jmeterTestFiles = [file("src/test/resources/Zone_RR_CRUD.jmx")]
jmeterPropertyFile = file("src/test/resources/jmeter.properties")
}

Jmeter.log

2015/08/17 12:05:05 WARN - jmeter.protocol.jdbc.config.DataSourceElement: Could not return Connection java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@coredb-useast1c01-02.qa.ultradns.net:2115:CUE1C2Q at java.sql.DriverManager.getConnection(DriverManager.java:604) at java.sql.DriverManager.getConnection(DriverManager.java:221) at org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance(JdbcConnectionFactory.java:182) at org.apache.avalon.excalibur.pool.InstrumentedResourceLimitingPool.newPoolable(InstrumentedResourceLimitingPool.java:655) at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.newPoolable(ValidatedResourceLimitingPool.java:145) at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.newPoolable(ResourceLimitingJdbcConnectionPool.java:91) at org.apache.avalon.excalibur.pool.InstrumentedResourceLimitingPool.get(InstrumentedResourceLimitingPool.java:371) at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:97) at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:188) at org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl.getConnection(DataSourceElement.java:286) at org.apache.jmeter.protocol.jdbc.config.DataSourceElement.getConnection(DataSourceElement.java:146) at org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:85) at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261) at java.lang.Thread.run(Thread.java:722)

The same thing is working fine when I placed ojdbc6.jar into jmeter/lib folder on my local machine.

I have no idea how it will work when I run through gradle task i,e. jmeterRun.

2
  • I have updated my question. Please look into it Aug 18, 2015 at 4:55
  • Have you tried the same with newest version 1.3.4 of plugin?
    – Dhiman
    Aug 24, 2015 at 19:57

2 Answers 2

1

This error is generally observed when JDBC driver is missing. No suitable driver found for jdbc:oracle:thin:@coredb-useast1c01-02.qa.ultradns.net:2115:CUE1C2Q Can you try placing driver jar in JMeter lib folder

0

You need to add the JDBC driver classpath to the dependencies pulled from the repo. The problem is that your JMeter build from Maven is missing the JDBC driver, pulling it in via Maven should fix that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.