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.

demouser123
3,5325 gold badges30 silver badges41 bronze badges
asked Aug 17, 2015 at 7:13
2
  • I have updated my question. Please look into it Commented Aug 18, 2015 at 4:55
  • Have you tried the same with newest version 1.3.4 of plugin? Commented 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

answered Jun 10, 2016 at 8:58
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.

answered Aug 16, 2016 at 19:35

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.