Martin Jönsson
Martin Jönsson

Reputation: 1

Cannot open .jtl Jmeter result after running test in terminal

When I run a Jmeter Testplan in apache-jmeter-5.4 from the terminal and later try to import the result to the script in the GUI i get the following error (see attached image):

Error in GUI

Would appreciate input what I might do wrong in the process when it comes to importing the result.

I am running this on a Ubuntu:

Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04

Command:

jmeter -n -t /home/usr/jmeter/script.jmx -l /home/usr/jmeter/scriptjtl

Scrip:

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments"/>
      </elementProp>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false</boolProp>
          <stringProp name="LoopController.loops">1</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">5</stringProp>
        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
        <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
      </ThreadGroup>
      <hashTree>
        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
            <collectionProp name="Arguments.arguments"/>
          </elementProp>
          <stringProp name="HTTPSampler.domain">opensource-demo.orangehrmlive.com</stringProp>
          <stringProp name="HTTPSampler.port"></stringProp>
          <stringProp name="HTTPSampler.protocol"></stringProp>
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
          <stringProp name="HTTPSampler.path">/</stringProp>
          <stringProp name="HTTPSampler.method">GET</stringProp>
          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
          <stringProp name="HTTPSampler.response_timeout"></stringProp>
        </HTTPSamplerProxy>
        <hashTree/>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>

Errorlog:

2021-04-16 15:50:32,813 ERROR o.a.j.u.JMeterUtils: Unexpected error - see log for details
2021-04-16 15:53:26,153 WARN o.a.j.s.CSVSaveService: Unknown column name 1618580568520
2021-04-16 15:53:26,153 INFO o.a.j.s.CSVSaveService: /home/martin.jonsson/Jmeter/Result/result.jtl does not appear to have a valid header. Using default configuration.
2021-04-16 15:53:26,154 WARN o.a.j.s.CSVSaveService: Insufficient columns to parse field 'allThreads' at line 1
2021-04-16 15:53:26,154 WARN o.a.j.r.ResultCollector: Problem reading JTL file: /home/martin.jonsson/Jmeter/Result/result.jtl
org.apache.jorphan.util.JMeterError: java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 12
    at org.apache.jmeter.save.CSVSaveService.makeResultFromDelimitedString(CSVSaveService.java:381) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.save.CSVSaveService.processSamples(CSVSaveService.java:170) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.reporters.ResultCollector.loadExistingFile(ResultCollector.java:379) [ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.visualizers.gui.AbstractVisualizer.stateChanged(AbstractVisualizer.java:247) [ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.util.FilePanelEntry.fireFileChanged(FilePanelEntry.java:140) [ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.util.FilePanelEntry.actionPerformed(FilePanelEntry.java:155) [ApacheJMeter_core.jar:5.4]
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) [?:?]
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) [?:?]
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) [?:?]
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) [?:?]
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) [?:?]
    at java.awt.Component.processMouseEvent(Component.java:6635) [?:?]
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3342) [?:?]
    at java.awt.Component.processEvent(Component.java:6400) [?:?]
    at java.awt.Container.processEvent(Container.java:2263) [?:?]
    at java.awt.Component.dispatchEventImpl(Component.java:5011) [?:?]
    at java.awt.Container.dispatchEventImpl(Container.java:2321) [?:?]
    at java.awt.Component.dispatchEvent(Component.java:4843) [?:?]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) [?:?]
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) [?:?]
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) [?:?]
    at java.awt.Container.dispatchEventImpl(Container.java:2307) [?:?]
    at java.awt.Window.dispatchEventImpl(Window.java:2772) [?:?]
    at java.awt.Component.dispatchEvent(Component.java:4843) [?:?]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) [?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:721) [?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:715) [?:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) [?:?]
    at java.awt.EventQueue$5.run(EventQueue.java:745) [?:?]
    at java.awt.EventQueue$5.run(EventQueue.java:743) [?:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:742) [?:?]
    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: java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 12
    at org.apache.jmeter.save.CSVSaveService.makeResultFromDelimitedString(CSVSaveService.java:318) ~[ApacheJMeter_core.jar:5.4]
    ... 40 more

Updated problem description

As @Dmitri T said there seemed to be an old version of jmeter when running the command jmeter --version resulted in the suggested output below:

Copyright (c) 1998-2015 The Apache Software Foundation
Version 2.13.20180731

Therefore I used the following command to remove Jmeter from Ubuntu repositories:

apt-get autoremove jmeter -y

I addition to that i updated the Java version to:

openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

After that I executed the following command in "bin" folder of my JMeter 5.4 installation:

./jmeter -n -t /home/usr/jmeter/script.jmx -l /home/usr/jmeter/scriptjtl
this ./ bit is uber important because it instructs shell to execute the JMeter startup script from the current folder.

This resulted in a new output file:

1618579509193,1440,HTTP Request,200,OK,Thread Group 1-1,text,true,39604,5,5,502
1618579509459,1180,HTTP Request,200,OK,Thread Group 1-3,text,true,39604,5,5,240
1618579509259,1419,HTTP Request,200,OK,Thread Group 1-2,text,true,39604,3,3,436
1618579509659,1026,HTTP Request,200,OK,Thread Group 1-4,text,true,39604,2,2,249
1618579509859,2907,HTTP Request,200,OK,Thread Group 1-5,text,true,39604,1,1,700
1618580134592,1209,HTTP Request,200,OK,Thread Group 1-3,text,true,39604,5,5,261
1618580134791,1070,HTTP Request,200,OK,Thread Group 1-4,text,true,39604,4,4,244
1618580134392,1476,HTTP Request,200,OK,Thread Group 1-2,text,true,39604,3,3,402
1618580134343,1574,HTTP Request,200,OK,Thread Group 1-1,text,true,39604,2,2,451
1618580134991,1129,HTTP Request,200,OK,Thread Group 1-5,text,true,39604,1,1,238
1618814671397,1044,HTTP Request,200,OK,Thread Group 1-2,text,true,,39604,272,5,5,https://opensource-demo.orangehrmlive.com/,218,0,104
1618814671269,1173,HTTP Request,200,OK,Thread Group 1-1,text,true,,39604,272,5,5,https://opensource-demo.orangehrmlive.com/,320,0,173
1618814671397,218,HTTP Request-0,301,Moved Permanently,Thread Group 1-2,text,true,,372,136,5,5,http://opensource-demo.orangehrmlive.com/,218,0,104
1618814671594,848,HTTP Request,200,OK,Thread Group 1-3,text,true,,39604,272,5,5,https://opensource-demo.orangehrmlive.com/,218,0,105
1618814671269,330,HTTP Request-0,301,Moved Permanently,Thread Group 1-1,text,true,,372,136,5,5,http://opensource-demo.orangehrmlive.com/,320,0,173
1618814671616,825,HTTP Request-1,200,OK,Thread Group 1-2,text,true,,39232,136,5,5,https://opensource-demo.orangehrmlive.com/,747,0,512
1618814671594,218,HTTP Request-0,301,Moved Permanently,Thread Group 1-3,text,true,,372,136,5,5,http://opensource-demo.orangehrmlive.com/,218,0,105
1618814671603,839,HTTP Request-1,200,OK,Thread Group 1-1,text,true,,39232,136,5,5,https://opensource-demo.orangehrmlive.com/,762,0,525
1618814671813,629,HTTP Request-1,200,OK,Thread Group 1-3,text,true,,39232,136,5,5,https://opensource-demo.orangehrmlive.com/,553,0,315
1618814671792,769,HTTP Request,200,OK,Thread Group 1-4,text,true,,39604,272,2,2,https://opensource-demo.orangehrmlive.com/,218,0,104
1618814671792,218,HTTP Request-0,301,Moved Permanently,Thread Group 1-4,text,true,,372,136,2,2,http://opensource-demo.orangehrmlive.com/,218,0,104
1618814672011,550,HTTP Request-1,200,OK,Thread Group 1-4,text,true,,39232,136,2,2,https://opensource-demo.orangehrmlive.com/,447,0,240
1618814671991,789,HTTP Request,200,OK,Thread Group 1-5,text,true,,39604,272,1,1,https://opensource-demo.orangehrmlive.com/,235,0,113
1618814671991,235,HTTP Request-0,301,Moved Permanently,Thread Group 1-5,text,true,,372,136,1,1,http://opensource-demo.orangehrmlive.com/,235,0,113
1618814672228,552,HTTP Request-1,200,OK,Thread Group 1-5,text,true,,39232,136,1,1,https://opensource-demo.orangehrmlive.com/,452,0,241
1618815155017,988,HTTP Request,200,OK,Thread Group 1-2,text,true,,39604,272,5,5,https://opensource-demo.orangehrmlive.com/,219,0,105
1618815155213,788,HTTP Request,200,OK,Thread Group 1-3,text,true,,39604,272,5,5,https://opensource-demo.orangehrmlive.com/,218,0,104
1618815155017,220,HTTP Request-0,301,Moved Permanently,Thread Group 1-2,text,true,,372,136,5,5,http://opensource-demo.orangehrmlive.com/,219,0,105
1618815155213,218,HTTP Request-0,301,Moved Permanently,Thread Group 1-3,text,true,,372,136,5,5,http://opensource-demo.orangehrmlive.com/,218,0,104
1618815155238,767,HTTP Request-1,200,OK,Thread Group 1-2,text,true,,39232,136,5,5,https://opensource-demo.orangehrmlive.com/,668,0,456
1618815155431,570,HTTP Request-1,200,OK,Thread Group 1-3,text,true,,39232,136,5,5,https://opensource-demo.orangehrmlive.com/,474,0,262
1618815154890,1138,HTTP Request,200,OK,Thread Group 1-1,text,true,,39604,272,3,3,https://opensource-demo.orangehrmlive.com/,303,0,166
1618815154890,308,HTTP Request-0,301,Moved Permanently,Thread Group 1-1,text,true,,372,136,3,3,http://opensource-demo.orangehrmlive.com/,303,0,166
1618815155204,824,HTTP Request-1,200,OK,Thread Group 1-1,text,true,,39232,136,3,3,https://opensource-demo.orangehrmlive.com/,714,0,490
1618815155412,784,HTTP Request,200,OK,Thread Group 1-4,text,true,,39604,272,2,2,https://opensource-demo.orangehrmlive.com/,234,0,112
1618815155412,234,HTTP Request-0,301,Moved Permanently,Thread Group 1-4,text,true,,372,136,2,2,http://opensource-demo.orangehrmlive.com/,234,0,112
1618815155648,548,HTTP Request-1,200,OK,Thread Group 1-4,text,true,,39232,136,2,2,https://opensource-demo.orangehrmlive.com/,444,0,235
1618815155614,822,HTTP Request,200,OK,Thread Group 1-5,text,true,,39604,272,1,1,https://opensource-demo.orangehrmlive.com/,235,0,113
1618815155614,235,HTTP Request-0,301,Moved Permanently,Thread Group 1-5,text,true,,372,136,1,1,http://opensource-demo.orangehrmlive.com/,235,0,113
1618815155851,585,HTTP Request-1,200,OK,Thread Group 1-5,text,true,,39232,136,1,1,https://opensource-demo.orangehrmlive.com/,475,0,251
1618815226871,953,HTTP Request,200,OK,Thread Group 1-2,text,true,,39604,272,5,5,https://opensource-demo.orangehrmlive.com/,220,0,106
1618815226871,220,HTTP Request-0,301,Moved Permanently,Thread Group 1-2,text,true,,372,136,5,5,http://opensource-demo.orangehrmlive.com/,220,0,106
1618815227092,732,HTTP Request-1,200,OK,Thread Group 1-2,text,true,,39232,136,5,5,https://opensource-demo.orangehrmlive.com/,633,0,396
1618815227066,808,HTTP Request,200,OK,Thread Group 1-3,text,true,,39604,272,4,4,https://opensource-demo.orangehrmlive.com/,234,0,112
1618815227066,234,HTTP Request-0,301,Moved Permanently,Thread Group 1-3,text,true,,372,136,4,4,http://opensource-demo.orangehrmlive.com/,234,0,112
1618815227300,574,HTTP Request-1,200,OK,Thread Group 1-3,text,true,,39232,136,4,4,https://opensource-demo.orangehrmlive.com/,474,0,239
1618815226731,1180,HTTP Request,200,OK,Thread Group 1-1,text,true,,39604,272,3,3,https://opensource-demo.orangehrmlive.com/,281,0,143
1618815226731,287,HTTP Request-0,301,Moved Permanently,Thread Group 1-1,text,true,,372,136,3,3,http://opensource-demo.orangehrmlive.com/,281,0,143
1618815227023,888,HTTP Request-1,200,OK,Thread Group 1-1,text,true,,39232,136,3,3,https://opensource-demo.orangehrmlive.com/,766,0,465
1618815227265,778,HTTP Request,200,OK,Thread Group 1-4,text,true,,39604,272,2,2,https://opensource-demo.orangehrmlive.com/,217,0,104
1618815227265,217,HTTP Request-0,301,Moved Permanently,Thread Group 1-4,text,true,,372,136,2,2,http://opensource-demo.orangehrmlive.com/,217,0,104
1618815227482,561,HTTP Request-1,200,OK,Thread Group 1-4,text,true,,39232,136,2,2,https://opensource-demo.orangehrmlive.com/,457,0,250
1618815227465,811,HTTP Request,200,OK,Thread Group 1-5,text,true,,39604,272,1,1,https://opensource-demo.orangehrmlive.com/,223,0,105
1618815227465,223,HTTP Request-0,301,Moved Permanently,Thread Group 1-5,text,true,,372,136,1,1,http://opensource-demo.orangehrmlive.com/,223,0,105
1618815227690,586,HTTP Request-1,200,OK,Thread Group 1-5,text,true,,39232,136,1,1,https://opensource-demo.orangehrmlive.com/,478,0,249
1618818979584,1037,HTTP Request,200,OK,Thread Group 1-1,text,true,,39604,272,5,5,https://opensource-demo.orangehrmlive.com/,292,0,162
1618818979584,297,HTTP Request-0,301,Moved Permanently,Thread Group 1-1,text,true,,372,136,5,5,http://opensource-demo.orangehrmlive.com/,292,0,162
1618818979887,734,HTTP Request-1,200,OK,Thread Group 1-1,text,true,,39232,136,5,5,https://opensource-demo.orangehrmlive.com/,642,0,424
1618818979718,929,HTTP Request,200,OK,Thread Group 1-2,text,true,,39604,272,4,4,https://opensource-demo.orangehrmlive.com/,222,0,105
1618818979718,222,HTTP Request-0,301,Moved Permanently,Thread Group 1-2,text,true,,372,136,4,4,http://opensource-demo.orangehrmlive.com/,222,0,105
1618818979942,705,HTTP Request-1,200,OK,Thread Group 1-2,text,true,,39232,136,4,4,https://opensource-demo.orangehrmlive.com/,598,0,369
1618818979913,774,HTTP Request,200,OK,Thread Group 1-3,text,true,,39604,272,3,3,https://opensource-demo.orangehrmlive.com/,220,0,104
1618818979913,221,HTTP Request-0,301,Moved Permanently,Thread Group 1-3,text,true,,372,136,3,3,http://opensource-demo.orangehrmlive.com/,220,0,104
1618818980135,552,HTTP Request-1,200,OK,Thread Group 1-3,text,true,,39232,136,3,3,https://opensource-demo.orangehrmlive.com/,451,0,241
1618818980112,762,HTTP Request,200,OK,Thread Group 1-4,text,true,,39604,272,2,2,https://opensource-demo.orangehrmlive.com/,218,0,105
1618818980112,218,HTTP Request-0,301,Moved Permanently,Thread Group 1-4,text,true,,372,136,2,2,http://opensource-demo.orangehrmlive.com/,218,0,105
1618818980330,544,HTTP Request-1,200,OK,Thread Group 1-4,text,true,,39232,136,2,2,https://opensource-demo.orangehrmlive.com/,442,0,231
1618818980312,833,HTTP Request,200,OK,Thread Group 1-5,text,true,,39604,272,1,1,https://opensource-demo.orangehrmlive.com/,235,0,112
1618818980312,235,HTTP Request-0,301,Moved Permanently,Thread Group 1-5,text,true,,372,136,1,1,http://opensource-demo.orangehrmlive.com/,235,0,112
1618818980549,596,HTTP Request-1,200,OK,Thread Group 1-5,text,true,,39232,136,1,1,https://opensource-demo.orangehrmlive.com/,485,0,260

However i seem to get a similar error in the GUI, after using the start up command for the GUI sh jmeter.sh, adding a "Listener" (see image for set up). Sorry for asking again but, I could not see to find anything else in link of setup that you provided (or am I missing something fundamental in the steps described above?):

2021-04-19 11:11:52,055 INFO o.a.j.s.FileServer: Default base='/home/martin.jonsson/apache-jmeter-5.4/bin'
2021-04-19 11:11:52,058 INFO o.a.j.g.a.Load: Loading file: /home/martin.jonsson/apache-jmeter-5.4/bin/MyPlans/commandlineexecution.jmx
2021-04-19 11:11:52,058 INFO o.a.j.s.FileServer: Set new base='/home/martin.jonsson/apache-jmeter-5.4/bin/MyPlans'
2021-04-19 11:11:52,170 INFO o.a.j.s.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2021-04-19 11:11:52,180 INFO o.a.j.s.SaveService: Using SaveService properties version 5.0
2021-04-19 11:11:52,181 INFO o.a.j.s.SaveService: Using SaveService properties file encoding UTF-8
2021-04-19 11:11:52,182 INFO o.a.j.s.SaveService: Loading file: /home/martin.jonsson/apache-jmeter-5.4/bin/MyPlans/commandlineexecution.jmx
2021-04-19 11:11:52,200 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-04-19 11:11:52,200 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-04-19 11:11:52,200 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-04-19 11:11:52,200 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-04-19 11:11:52,200 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2021-04-19 11:11:52,200 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2021-04-19 11:11:52,265 WARN o.a.j.g.a.Load: Unexpected error. java.lang.NullPointerException
java.lang.NullPointerException: null
    at java.util.ArrayDeque.addLast(ArrayDeque.java:304) ~[?:?]
    at java.util.ArrayDeque.add(ArrayDeque.java:495) ~[?:?]
    at org.apache.jmeter.gui.action.LoadRecentProject.updateRecentFileMenuItems(LoadRecentProject.java:125) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.util.JMeterMenuBar.setProjectFileLoaded(JMeterMenuBar.java:144) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.MainFrame.setProjectFileLoaded(MainFrame.java:330) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.GuiPackage.setTestPlanFile(GuiPackage.java:732) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:136) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:101) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:88) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:44) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.4]
    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(Native Method) ~[?:?]
    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) [?:?]
2021-04-19 11:11:52,271 ERROR o.a.j.u.JMeterUtils: Unexpected error - see log for details
2021-04-19 11:12:13,488 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times
2021-04-19 11:12:13,488 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2021-04-19 11:12:13,489 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true
2021-04-19 11:12:13,489 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000
2021-04-19 11:12:13,574 INFO o.a.j.v.ViewResultsFullVisualizer: Add JavaFX to your Java installation if you want to use renderer: org.apache.jmeter.visualizers.RenderInBrowser
2021-04-19 11:12:18,352 WARN o.a.j.s.CSVSaveService: Unknown column name 1618579509193
2021-04-19 11:12:18,355 INFO o.a.j.s.CSVSaveService: /home/martin.jonsson/apache-jmeter-5.4/bin/MyPlans/result.jtl does not appear to have a valid header. Using default configuration.
2021-04-19 11:12:18,356 WARN o.a.j.s.CSVSaveService: Insufficient columns to parse field 'allThreads' at line 1
2021-04-19 11:12:18,356 WARN o.a.j.r.ResultCollector: Problem reading JTL file: /home/martin.jonsson/apache-jmeter-5.4/bin/MyPlans/result.jtl
org.apache.jorphan.util.JMeterError: java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 12
    at org.apache.jmeter.save.CSVSaveService.makeResultFromDelimitedString(CSVSaveService.java:381) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.save.CSVSaveService.processSamples(CSVSaveService.java:170) ~[ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.reporters.ResultCollector.loadExistingFile(ResultCollector.java:379) [ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.visualizers.gui.AbstractVisualizer.stateChanged(AbstractVisualizer.java:247) [ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.util.FilePanelEntry.fireFileChanged(FilePanelEntry.java:140) [ApacheJMeter_core.jar:5.4]
    at org.apache.jmeter.gui.util.FilePanelEntry.actionPerformed(FilePanelEntry.java:155) [ApacheJMeter_core.jar:5.4]
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) [?:?]
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) [?:?]
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) [?:?]
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) [?:?]
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) [?:?]
    at java.awt.Component.processMouseEvent(Component.java:6635) [?:?]
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3342) [?:?]
    at java.awt.Component.processEvent(Component.java:6400) [?:?]
    at java.awt.Container.processEvent(Container.java:2263) [?:?]
    at java.awt.Component.dispatchEventImpl(Component.java:5011) [?:?]
    at java.awt.Container.dispatchEventImpl(Container.java:2321) [?:?]
    at java.awt.Component.dispatchEvent(Component.java:4843) [?:?]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) [?:?]
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) [?:?]
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) [?:?]
    at java.awt.Container.dispatchEventImpl(Container.java:2307) [?:?]
    at java.awt.Window.dispatchEventImpl(Window.java:2772) [?:?]
    at java.awt.Component.dispatchEvent(Component.java:4843) [?:?]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) [?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:721) [?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:715) [?:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) [?:?]
    at java.awt.EventQueue$5.run(EventQueue.java:745) [?:?]
    at java.awt.EventQueue$5.run(EventQueue.java:743) [?:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:742) [?:?]
    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: java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 12
    at org.apache.jmeter.save.CSVSaveService.makeResultFromDelimitedString(CSVSaveService.java:318) ~[ApacheJMeter_core.jar:5.4]
    ... 40 more

Upvotes: 0

Views: 772

Answers (2)

Martin J&#246;nsson
Martin J&#246;nsson

Reputation: 1

This is what helped me by combining the answers given here, I needed to reinstall the software doing these steps:

*** Install Jmeter

Download apache-jmeter-5.4.1.zip from:

Here

Can use this link as additional references: Link for installation

*** Start Jmeter GUI

Open the download file from its location ex:

cd /home/user/Downloads/apache-jmeter-5.4.1/bin

Then enter to start the GUI:

./jmeter.sh

Then close the GUI

*** To start Jmeter without GUI and save as CSV navigate to:

cd /home/muser/Downloads/apache-jmeter-5.4.1/bin/examples

Execute Jmeter from commandline using this example for CSV:

./jmeter -n -t /home/user/Downloads/apache-jmeter-5.4.1/bin/examples/CSVSample.jmx -l /home/user/Downloads/apache-jmeter-5.4.1/bin/examples/Result/data.csv

Or execute Jmeter from commandline using this example for JTL

./jmeter -n -t /home/user/Downloads/apache-jmeter-5.4.1/bin/examples/CSVSample.jmx -l /home/user/Downloads/apache-jmeter-5.4.1/bin/examples/Result/data.jtl

Thereafter it is possible to open the saved data (csv/jtl) in the GUI mode

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168092

It looks like you're using different versions for running the test and for opening the results.

If you run the command like:

jmeter -n -t /home/usr/jmeter/script.jmx -l /home/usr/jmeter/scriptjtl

it will pick up the jmeter binary or script which is first on the PATH and if you have jmeter package installed from Ubuntu repo it explains everything

Try running jmeter --version command and I'm pretty much sure you will get something like:

Copyright (c) 1998-2015 The Apache Software Foundation
Version 2.13.20180731

this version is 6 years old and default Results File Configuration changed several times since then

Make sure to run your test with JMeter 5.4, in order to do so:

  1. Go to the "bin" folder of your JMeter 5.4 installation

  2. Execute this command:

    ./jmeter -n -t /home/usr/jmeter/script.jmx -l /home/usr/jmeter/scriptjtl
    

    this ./ bit is uber important because it instructs shell to execute the JMeter startup script from the current folder.

More information: Get Started With JMeter: Installation & Tests

In order to avoid future confusion I'd recommend removing JMeter from Ubuntu repositories like apt-get autoremove jmeter -y.

You may need to re-install Java after this: apt-get install openjdk-8-jre -y

Upvotes: 0

Related Questions