JMeter: No Class Def Found Error: kg/apc/jmeter/JMeterPluginsUtils - jmeter

I'm trying to run a JMeter test and I keep getting the error listed below. I'm running in non-gui mode on an EC2 instance. I know I'm missing a .jar file and that's what is causing the error. But when I head over to Apache to look through their JMeter plugins, I can't find one that resolves this error.
2017-09-06 21:18:12,954 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.NoClassDefFoundError: kg/apc/jmeter/JMeterPluginsUtils
at kg.apc.jmeter.PluginsCMDWorker.<init>(PluginsCMDWorker.java:51) ~[jmeter-plugins-cmd-2.1.jar:?]
at kg.apc.jmeter.listener.GraphsGeneratorListener.testEnded(GraphsGeneratorListener.java:146) ~[jmeter-plugins-graphs-ggl-2.0.jar:?]
at kg.apc.jmeter.listener.GraphsGeneratorListener.testEnded(GraphsGeneratorListener.java:137) ~[jmeter-plugins-graphs-ggl-2.0.jar:?]
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfEnd(StandardJMeterEngine.java:230) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:498) ~[ApacheJMeter_core.jar:3.2 r1790748]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
Caused by: java.lang.ClassNotFoundException: kg.apc.jmeter.JMeterPluginsUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_141]

Your JMeter Plugins installation is corrupt, double check you have jmeter-plugins-cmn-jmeter-0.3.jar file in the "lib" folder of your JMeter installation. If not - you will have to re-install JMeterPluginsCMD Command Line Tool
Be aware that recommended way of installing JMeter Plugins and keeping them up-to-date is using JMeter Plugins Manager

If you are running in Non-UI mode just remove the plugin element from your jmx file.

Related

Getting Error 500 in SMTP sampler in JMeter

I am getting this error while running the SMTP Sampler in JMeter:
Response code: 500
Response message: IOException while sending message
And I got the following in the logs:
javax.mail.MessagingException: IOException while sending message at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1167)
~[mail-1.5.0-b01.jar:1.5.0-b01] at
org.apache.jmeter.protocol.smtp.sampler.protocol.SendMailCommand.execute(SendMailCommand.java:303)
~[ApacheJMeter_mail.jar:3.2 r1790748] at
org.apache.jmeter.protocol.smtp.sampler.SmtpSampler.executeMessage(SmtpSampler.java:169)
[ApacheJMeter_mail.jar:3.2 r1790748] at
org.apache.jmeter.protocol.smtp.sampler.SmtpSampler.sample(SmtpSampler.java:146)
[ApacheJMeter_mail.jar:3.2 r1790748] at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:491)
[ApacheJMeter_core.jar:3.2 r1790748] at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425)
[ApacheJMeter_core.jar:3.2 r1790748] at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254)
[ApacheJMeter_core.jar:3.2 r1790748] at java.lang.Thread.run(Unknown
Source) [?:1.8.0_201] Caused by: java.io.FileNotFoundException: V:\001
Automation\Automation Scripts\Test Plan\Cloud\Final\Priority 6 -
Process (Access is denied) at java.io.FileInputStream.open0(Native
Method) ~[?:1.8.0_201]
What would probably the cause of the issue and how it will be resolved?
According to the error message JMeter cannot access the following file:
V:\001 Automation\Automation Scripts\Test Plan\Cloud\Final\Priority 6 - Process
make sure to amend the permissions to the file and make sure the user account under which you're running JMeter has access to the given file.
Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.1 (or whatever is the latest stable version which is available at JMeter Downloads page) as soon as possible.

Jmeter plugins manager failed to install plugin

JMeter (version 4.0) plugins manager (jmeter-plugins-manager-1.0.2) failed to install plugins.
Following error is thrown.
2018-05-29 12:39:00,977 ERROR o.j.r.PluginManager: Failed to download cmdrunner>=2.2
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.createFileExclusively(Native Method) ~[?:1.8.0_161]
at java.io.File.createTempFile(Unknown Source) ~[?:1.8.0_161]
at java.io.File.createTempFile(Unknown Source) ~[?:1.8.0_161]
at org.jmeterplugins.repository.JARSourceHTTP.getJAR(JARSourceHTTP.java:395) ~[jmeter-plugins-manager-1.0.2.jar:?]
at org.jmeterplugins.repository.PluginManager.applyChanges(PluginManager.java:167) [jmeter-plugins-manager-1.0.2.jar:?]
at org.jmeterplugins.repository.PluginManagerDialog$4.run(PluginManagerDialog.java:226) [jmeter-plugins-manager-1.0.2.jar:?]
quick fix:
download jar from https://mvnrepository.com/artifact/kg.apc/cmdrunner/2.2.1
and place it int jmeter/library folder

JMeter throws java.lang.NoSuchMethodError: org.apache.jmeter.samplers.SampleSaveConfiguration.setFormatter(Ljava/text/DateFormat;)

2017-09-29 12:39:56,306 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2017-09-29 12:39:56,307 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2017-09-29 12:39:56,312 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.NoSuchMethodError:
org.apache.jmeter.samplers.SampleSaveConfiguration.setFormatter(Ljava/text/DateFormat;)
at kg.apc.jmeter.JMeterPluginsUtils.doBestCSVSetup(JMeterPluginsUtils.java:256) ~[jmeter-plugins-cmn-jmeter-0.3.jar:?]
at kg.apc.jmeter.perfmon.PerfMonCollector.setupSaving(PerfMonCollector.java:136) ~[jmeter-plugins-perfmon-2.1.jar:?]
at kg.apc.jmeter.perfmon.PerfMonCollector.testStarted(PerfMonCollector.java:113) ~[jmeter-plugins-perfmon-2.1.jar:?]
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:355) ~[ApacheJMeter_core.jar:3.2 r1790748]
at kg.apc.jmeter.vizualizers.CorrectedResultCollector.testStarted(CorrectedResultCollector.java:28) ~[jmeter-plugins-cmn-jmeter-0.3.jar:?]
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:218) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:388) ~[ApacheJMeter_core.jar:3.2 r1790748]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_65]
As per UBIK LOAD PACK 's answer and Subho comment above:
For Jmeter 3.3 and jpgc-perfmon-2.1 (latest versions as I write), after the install of the perfmon zip file into Jmeter, you need to:
- remove the jmeter-plugins-cmn-jmeter-0.3.jar from the /lib directory
- and replace it with jmeter-plugins-cmn-jmeter-0.4.jar (available from Maven Central).
Thanks so much guys! Spent hours on this (I dont have enough reputation to just add a comment to UBIKs answer)
You are using a version of Perfmon plugin which is incompatible with Apache JMeter version as per this message:
java.lang.NoSuchMethodError:
org.apache.jmeter.samplers.SampleSaveConfiguration.setFormatter(Ljava/text/DateFormat;)
So either update jmeter-plugins perfmon plugin or downgrade your jmeter.

sonar XML plugin installation failure in jenkins

I am getting the following error when I manually try to install sonar-xml-plugin-1.4.1.hpi plugin in jenkins:
Error:
Failure -
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1383)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1161)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Illegal dependency specifier META-INF/lib/xml-squid-1.4.1.jar META-INF/lib/jaxen-1.1.4.jar META-INF/lib/xalan-2.7.2.jar META-INF/lib/sslr-core-1.20.jar META-INF/lib/sslr-squid-bridge-2.6.jar META-INF/lib/xercesImpl-2.8.1.jar META-INF/lib/serializer-2.7.2.jar META-INF/lib/sslr-xpath-1.20.jar
at hudson.PluginWrapper$Dependency.<init>(PluginWrapper.java:218)
at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:231)
at hudson.PluginManager.dynamicLoad(PluginManager.java:483)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1379)
... 5 more
Do i need to install any dependencies first?? or is it something else that I am missing?
Where did you find this file? The SonarQube XML plugin is a plugin for SonarQube and should be installed on a SonarQube server, not on a Jenkins server.

ClassNotFoundException when running newest version of stanford-postagger 3.6.0

I found the Stanford pos tagger and would like to use it in a project I am working on.
Unfortunately, I get the following error when I try to run it:
Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at edu.stanford.nlp.io.IOUtils.(IOUtils.java:41)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.readModelAndInit(MaxentTagger.java:765)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.(MaxentTagger.java:298)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.(MaxentTagger.java:263)
at edu.stanford.nlp.tagger.maxent.MaxentTaggerGUI$1.run(MaxentTaggerGUI.java:89)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 5 more
The same error occurred whether running within eclipse, command line, or gui.
I discovered after searching for a solution and trying many that didn't help, that the previous version 3.5.2 runs just fine with no errors so I will revert to the previous version for now.
Is it possible there is a problem with the new version?
We've added slf4j logging to our releases. In 3.6.0 there is a folder called lib which needs to be added to the CLASSPATH.

Resources