Reputation: 31
I am trying to open jmeter files on amazon machines in GUI mode. It keeps on throwing this error:
"Could not initialize class.org.apache.jmeter.save.SaveService"
The log files:
jmeter.JMeter: Uncaught exception: java.lang.NoSuchMethodError: com.thoughtworks.xstream.core.JVM.newReflectionProvider()Lcom/thoughtworks/xstream/converters/reflection/ReflectionProvider;
at org.apache.jmeter.save.converters.SampleSaveConfigurationConverter.<clinit>(SampleSaveConfigurationConverter.java:47)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.jmeter.save.SaveService.registerConverter(SaveService.java:297)
at org.apache.jmeter.save.SaveService.initProps(SaveService.java:250)
at org.apache.jmeter.save.SaveService.<clinit>(SaveService.java:191)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:130)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:102)
at org.apache.jmeter.gui.action.LoadRecentProject.doAction(LoadRecentProject.java:68)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.Ac
Upvotes: 3
Views: 6853
Reputation: 374
I was experiencing this problem and this was the first question that came up when I searched the error. The reason was that running sudo apt install jmeter
installs jmeter 2.13 (on Ubuntu 20.04) and it thinks that 2.13 is the latest release. The latest version of jmeter at the time of posting this is 5.4.3. Here is the download link to the latest release: https://jmeter.apache.org/download_jmeter.cgi. After installing the latest version I no longer had the issue.
Upvotes: 0
Reputation: 371
You have an old version of xstream JAR which does not yet have the required method. Have you updated from JMeter 2.12 to 2:13? If so, make sure there is only 1 version of xstream on your classpath (1.4.7 for 2.12, 1.4.8 for 2.13)! Look into lib folder.
Upvotes: 2
Reputation: 34556
Either your jmeter bundle is corrupt, you have no jars or truncated ones in jmeter/lib folder. Check you transfered your jars in binary mode or transfer a tar.gz file and unzip it on the target machine.
Or you have some linux rights issues.
Upvotes: 0