3

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
Alex
  • 878
  • 1
  • 10
  • 25
user1752844
  • 31
  • 1
  • 3

3 Answers3

2

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.

vernjan
  • 379
  • 3
  • 11
  • HI @vernjan i have updated xstream as you said but its giving same error. – user1752844 Aug 18 '15 at 18:10
  • Hey, I have checked and this method was added in xstream 1.4.5. You must have at least 2 versions of com.thoughtworks.xstream.core.JVM class on your classpath. Can you check for it? It doesn't have to be in lib folder, someone might have put it in lib/ext or to any other folder classloaded by JMeter (see https://jmeter.apache.org/usermanual/get-started.html#classpath). Or perhaps it is bundled in some other JAR or in a wrapping container (not sure how Amazon environment looks like). – vernjan Aug 18 '15 at 20:47
  • Hi Vernjan, i have tried a lot and dint get any work around. – user1752844 Sep 01 '15 at 03:10
0

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.

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
0

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.

gfdb
  • 311
  • 2
  • 9