A sample command is -
Jmeter-master:/tmp$ JMeterPluginsCMD.sh --generate-csv /tmp/test.csv --input-jtl /tmp/jmeter.jtl --plugin-type AggregateReport
This works in Windows with the .bat file after updating the log4j files, but not with the .sh in Linux. I get the following error. Anyone else encountering this? BTW - It was working fine over a week ago in Linux, but stopped working at some point and don't recall making any breaking changes.
ERROR: java.lang.NoClassDefFoundError: kg/apc/logging/LoggingUtils *** Problem's technical details go below *** Home directory was detected as: /opt/apache-jmeter-5.0/lib Exception in thread "main" java.lang.NoClassDefFoundError: kg/apc/logging/LoggingUtils at kg.apc.cmdtools.ReporterTool.(ReporterTool.java:17) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at java.base/java.lang.Class.newInstance(Class.java:584) at kg.apc.cmdtools.PluginsCMD.getToolInstance(PluginsCMD.java:128) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:50) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:115) Caused by: java.lang.ClassNotFoundException: kg.apc.logging.LoggingUtils at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 14 more
CodePudding user response:
The java.lang.NoClassDefFoundError
usually has something to do with the Runtime Environment Version. Try checking if both Java versions are equal.
If they aren't equal, try updating/downgrading your version on the Linux system accordingly.
If they are equal, try checking for missing libraries.
CodePudding user response:
I have no idea what do you mean by "updating log4j files to 2.17", the error you're getting is about missing jmeter-plugins-cmn-jmeter
.jar in JMeter Classpath
If you prefer manual .jar libraries manipulation you could download the version you like the most to "lib" folder of your JMeter installation, on next JMeter restart or running the command-line graph generator tool the error should go away.
However I would recommend:
- Orchestrating JMeter Plugins using JMeter Plugins Manager instead of doing it manually
- Using the latest version of JMeter instead of trying to upgrade individual components