'Jmeter fails to open .jmx file created by Badboy
When i tried to open a jmx file in Jmeter created by Badboy, Jmeter throws this error:
Here is the log file :
2019-12-14 12:21:36,712 INFO o.a.j.s.SaveService: Loading file: C:\Users\hp\Documents\MyFirstJMeterScript.jmx
2019-12-14 12:21:36,772 WARN o.a.j.g.a.Load: Unexpected error. java.lang.IllegalArgumentException: Problem loading XML from:'C:\Users\hp\Documents\MyFirstJMeterScript.jmx'.
Cause:
CannotResolveClassException: node
Detail:com.thoughtworks.xstream.mapper.CannotResolveClassException: node
java.lang.IllegalArgumentException: Problem loading XML from:'C:\Users\hp\Documents\MyFirstJMeterScript.jmx'.
Cause:
CannotResolveClassException: node
Detail:com.thoughtworks.xstream.mapper.CannotResolveClassException: node
at org.apache.jmeter.save.SaveService.readTree(SaveService.java:459) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.save.SaveService.loadTree(SaveService.java:432) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:130) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:102) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:89) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:45) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:88) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:70) ~[ApacheJMeter_core.jar:5.2.1]
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) ~[?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:721) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:715) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:391) [?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:740) [?:?]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]
Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException: node
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:81) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[xstream-1.4.11.jar:1.4.11]
at org.apache.jmeter.save.SaveService$XStreamWrapper$1.realClass(SaveService.java:98) ~[ApacheJMeter_core.jar:5.2.1]
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1487) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1467) ~[xstream-1.4.11.jar:1.4.11]
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1338) ~[xstream-1.4.11.jar:1.4.11]
at org.apache.jmeter.save.SaveService.readTree(SaveService.java:449) ~[ApacheJMeter_core.jar:5.2.1]
... 20 more
2019-12-14 12:24:24,785 INFO o.a.j.g.a.Load: Loading file: C:\Users\hp\Documents\MyFirstJMeterScript.jmx
2019-12-14 12:24:24,786 INFO o.a.j.s.FileServer: Set new base='C:\Users\hp\Documents'
2019-12-14 12:24:24,786 INFO o.a.j.s.SaveService: Loading file: C:\Users\hp\Documents\MyFirstJMeterScript.jmx
2019-12-14 12:24:24,881 WARN o.a.j.g.a.Load: Unexpected error. java.lang.IllegalArgumentException: Problem loading XML from:'C:\Users\hp\Documents\MyFirstJMeterScript.jmx'.
Cause:
CannotResolveClassException: node
Detail:com.thoughtworks.xstream.mapper.CannotResolveClassException: node
java.lang.IllegalArgumentException: Problem loading XML from:'C:\Users\hp\Documents\MyFirstJMeterScript.jmx'.
Cause:
CannotResolveClassException: node
Detail:com.thoughtworks.xstream.mapper.CannotResolveClassException: node
at org.apache.jmeter.save.SaveService.readTree(SaveService.java:459) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.save.SaveService.loadTree(SaveService.java:432) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:130) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:102) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:89) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:45) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:88) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:70) ~[ApacheJMeter_core.jar:5.2.1]
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) ~[?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:721) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:715) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:391) [?:?]
Solution 1:[1]
I don't think that using Badboy (whatever it is) is the best approach to create a JMeter test script. Looking into your error details:
CannotResolveClassException: node
I recall the fact that the last JMeter version which was able to open JMeter test plans starting from <node>
was JMeter 2.13
If you really need to open the .jmx script recorded by Badboy you need to get JMeter 2.13
However be informed that according to JMeter Best Practices you should always be using the latest version of JMeter so if you can re-record your test scenario, it's better to stick to the latest stable version of JMeter and use HTTP(S) Test Script Recorder.
Solution 2:[2]
you may try installing jmeter plugin manager and add it in lib/ext folder. hope that works for you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dmitri T |
Solution 2 | Indrayani |