Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmeter - getting Exception - while running my suite in a new machine

Tags:

jmeter

I copied my complete Jmeter folder from one machine to other and tried to run. Stuck with the error - ArrayIndexOutOfBoundsException: 0. Please help

INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.assertions.BSFAssertion INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.extractor.BSFPostProcessor INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.modifiers.BSFPreProcessor INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser INFO - jorphan.exec.KeyToolUtils: keytool found at 'keytool' INFO - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file G:\official\JMeter\apache-jmeter-3.1\bin\proxyserver.jks INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.java.sampler.BSFSampler INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.config.MongoSourceElement INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.timers.BSFTimer INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.visualizers.BSFListener INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.visualizers.MonitorHealthVisualizer INFO - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times INFO - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1 INFO - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true INFO - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000 INFO - jmeter.services.FileServer: Default base='G:\official\JMeter\apache-jmeter-3.1\bin' INFO - jmeter.gui.action.Load: Loading file: G:\official\JMeter\apache-jmeter-3.1\bin\Cafyne_3.0.jmx INFO - jmeter.services.FileServer: Set new base='G:\official\JMeter\apache-jmeter-3.1\bin' INFO - jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2 INFO - jmeter.save.SaveService: Using SaveService properties file encoding UTF-8 INFO - jmeter.save.SaveService: Using SaveService properties version 3.1 INFO - jmeter.save.SaveService: All converter versions present and correct INFO - jmeter.save.SaveService: Loading file: G:\official\JMeter\apache-jmeter-3.1\bin\Cafyne_3.0.jmx INFO - jmeter.protocol.http.control.CookieManager: Settings: Delete null: true Check: true Allow variable: true Save: false Prefix: COOKIE_ INFO - jmeter.services.FileServer: Set new base='G:\official\JMeter\apache-jmeter-3.1\bin' ERROR - jmeter.gui.action.ActionRouter: Error processing org.apache.jmeter.gui.action.Start@71687585 java.lang.ArrayIndexOutOfBoundsException: 0 at org.apache.jmeter.gui.action.Start.startEngine(Start.java:193) at org.apache.jmeter.gui.action.Start.startEngine(Start.java:174) at org.apache.jmeter.gui.action.Start.startEngine(Start.java:164) at org.apache.jmeter.gui.action.Start.doAction(Start.java:108) at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:80) at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40) at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:62) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

like image 880
Raghu Ram.k Avatar asked Nov 29 '22 22:11

Raghu Ram.k


2 Answers

I know the question is old but I went through the same problem and found no solutions. Then I analyzed the source code of JMeter and I leave here the solution for other people who go through it.

In my case when I created a test plan, by default it was disabled.

After I enabled the test plan (right click -> enable) it started working!

like image 145
Flavio Andrade Avatar answered Dec 15 '22 05:12

Flavio Andrade


Code is: (failed in testTree.getArray()[0])

 HashTree testTree = gui.getTreeModel().getTestPlan();

 JMeter.convertSubTree(testTree);
        if(threadGroupsToRun != null && threadGroupsToRun.length>0) {
            removeThreadGroupsFromHashTree(testTree, threadGroupsToRun);
        }


 testTree.add(testTree.getArray()[0], gui.getMainFrame());

It seems that test plan is empty.

can you check G:\official\JMeter\apache-jmeter-3.1\bin\Cafyne_3.0.jmx

maybe file wasn't copied ok

like image 31
user7294900 Avatar answered Dec 15 '22 03:12

user7294900