Cannot load JDBC driver class 'com.mysql.jdbc.Driver' jmeter - jmeter

Getting this error while running the test plan on jmeter.
I have also added mysql-connector-java-5.0.8-bin.jar file in the lib folder and re-started the jmeter as well after adding the jar file.
Can anyone has solution please?

Looking into Changes in MySQL Connector/J 5.0.8 (2007-10-09) it appears you are using a 10-years-old driver, it might be the cause of your problem.
Download latest available JMeter version (JMeter 3.3 as of now) - let's start clean
Download latest GA release of the MysQL Connector/J (5.1.44 as of now), unpack it somewhere and copy mysql-connector-java-5.1.44-bin.jar file to JMeter Classpath
Restart JMeter to pick the .jar up
Run your test once again. If there will be failures - update your question with screenshots of the JDBC Connection Configuration, JDBC Request Sampler and jmeter.log file contents.

Related

JMeter WebDriver Sampler Groovy : Error unable to resolve class org.openqa.selenium.manager.SeleniumManager is thrown

I have JMeter 5.5 running on Mac 12.6 (21G115) with WebDriver Sampler for doing client side performance testing. It works without any issue with javascript.
I want to move to Groovy quickly and got following error when test was executed.
It looks like a PATH issue.
2023-01-04 23:14:08,307 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[Thread Group 1-1,6,main]
java.lang.NoClassDefFoundError: org/openqa/selenium/manager/SeleniumManager
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:141) ~[selenium-remote-driver-4.7.2.jar:?]
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:41) ~[selenium-chrome-driver-4.7.2.jar:?]
at
Following Selenium jars are available in JMETER_HOME/lib/ext folder
As per JavaDoc
This implementation is still in beta, and may change. The Selenium-Manager binaries are distributed in a JAR file (org.openqa.selenium:selenium-manager) for the Java binding language
I fail to see any sign of selenium-manager jar in your beautiful screenshot hence you're getting the error.
If you want to instantiate the WebDriver yourself - move to JSR223 Sampler and make sure that selenium-manager is in your classpath.
ChromeDriver is being managed by Chrome Driver Config so you can just add it, provide the path to your chromedriver executable and refer it in your script as WDS.browser
The above code should work just fine assuming you've installed WebDriver Sampler using JMeter Plugins Manager
Also "lib/ext" folder is for JMeter Plugins, dependency libraries should go "lib" folder, see JMeter Classpath section for more details.

Jmeter - Cannot invoke "org.apache.jmeter.gui.JMeterGUIComponent.clearGui()" because "guicomp" is null

I am trying to migrate to Jmeter 5.5
I have a script that works perfectly fine on Jmeter 5.4.3, but when I try to load it on JM 5.5 I got:
-Version 5.5 is just downloaded
-The plugins that I am using in /lib folder are (C:\apache-jmeter-5.4.3\lib\ext) are:
jmeter-plugins-dummy-0.4.jar
jmeter-plugins-manager-1.7.jar
How to solve this issue with JM5.5?
We cannot help you without seeing:
At least schematic view of your Test Plan
jmeter.log file (preferably with debug logging enabled for all org.apache.jmeter components)
Instead of installing the plugins manually just drop the latest version of JMeter Plugins Manager to "lib/ext" folder of your JMeter installation and restart JMeter to pick it up.
One done when you will try to open the test plan which uses any of JMeter Plugins known to the plugins manager you will be prop
I had the same issue. I had to add the DBMon Sample Collector plugin, and it solved the problem.

JMeter not able to open test plan ConversionException

I am using jmeter almost every day.
Today when I try open my test plan (.jmx file), I get error (screenshot below).
Yesterday it worked with no problem and I did not install anything new, new plugin or new version of JMeter.
I found similar issues here, so I tried to install jmeter-plugins-manager-1.1.jar then update other plugins but no changes, still same error.
I tried newest version of JMeter 4.0 but it didn't help neither.
error from version 3.1 (yesterday works)
error from version 4.0
The error you're getting is about CorrectedResultCollector so my expectation is that your Test Plan contains some JMeter Plugins
Download JMeter Plugins Manager and drop it to lib/ext folder of your JMeter installation
Restart JMeter to pick it up
Open your test - the Plugin Manager should suggest you to install dependencies.
The class itself lives in jmeter-plugins-common jar however there could be more plugins which are missing in your current JMeter setup.

Jmeter : Websocket Sampler showing error

I am trying to connect WebSocket using Jmeter- Websocket sampler.
For this, I used maciejzaleski plugin.
Getting below error from the jmeter log.
ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.NoClassDefFoundError: org/eclipse/jetty/util/ssl/SslContextFactory
If I am missing something, let me know how to correct it.
As per WebSocket Testing With Apache JMeter article:
Check Project Wiki for any dependencies, to be completely sure all the jars from target/site/plugins directory should go either to /lib or to /lib/ext folder of your JMeter installation. Currently (for release 1.0.1) the required libraries live in Jetty Bundles 9.1.1.v20140108.
So:
Download all required libraries
Put them into JMeter classpath (i.e. "lib" folder of your JMeter installation
Restart JMeter to pick the libraries up
You can follow below article, I followed and works fine.
By the way take latest Jmeter 3.0 or above.
https://www.redline13.com/blog/2016/01/cloud-based-jmeter-websocket-testing/

javax / websocket / CloseReason $ CloseCode

I refer to this tutorial
https://blazemeter.com/blog/websocket-testing-apache-jmeter
I run websocket java in jmeter ,but jmeter log responsed like this -
jmeter.JMeter: Uncaught exception: java.lang.NoClassDefFoundError: javax / websocket / CloseReason $ CloseCode
I do not know how to solve this problem ?
Stacktrace
Thanks in advance!
Any "NoClassDefFoundError" usually means that either you don't have the relevant .jar in JMeter classpath or you haven't restarted JMeter after dropping the .jar into its lib or lib/ext folder.
I would suggest the following:
Get the latest JMeter version (it is 3.0 at the moment)
Install JMeter Plugins Manager
Install WebSocket Sampler via the plugins manager
If you're trying to run JMeter via JSR223 Sampler and Java code example - the same, make sure Tyrus libraries are in JMeter classpath and JMeter is restarted after that.

Resources