Bug 64957 - When importing example CSVSample.jmx displaying nullpointerexception
Summary: When importing example CSVSample.jmx displaying nullpointerexception
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.4
Hardware: PC All
: P2 normal (vote)
Target Milestone: JMETER 5.4.1
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
: 65003 65045 65074 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-05 19:05 UTC by Srinivas Kadiyala
Modified: 2021-01-20 11:44 UTC (History)
5 users (show)



Attachments
Fix regression from switching to ArrayList from LinkedList (792 bytes, patch)
2020-12-06 10:19 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Srinivas Kadiyala 2020-12-05 19:05:26 UTC
2020-12-06 00:28:13,236 INFO o.a.j.s.SaveService: Loading file: C:\JMeterTools\apache-jmeter-5.4\apache-jmeter-5.4\bin\examples\CSVSample.jmx
2020-12-06 00:28:13,778 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times
2020-12-06 00:28:13,778 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2020-12-06 00:28:13,778 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true
2020-12-06 00:28:13,778 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000
2020-12-06 00:28:14,051 WARN o.a.j.g.a.Load: Unexpected error. java.lang.NullPointerException
java.lang.NullPointerException: null
	at java.util.ArrayDeque.addLast(Unknown Source) ~[?:1.8.0_261]
	at java.util.ArrayDeque.add(Unknown Source) ~[?:1.8.0_261]
	at org.apache.jmeter.gui.action.LoadRecentProject.updateRecentFileMenuItems(LoadRecentProject.java:125) ~[ApacheJMeter_core.jar:5.4]
Comment 1 Srinivas Kadiyala 2020-12-05 19:26:00 UTC
I am using Java 1.8

C:\Users\srinivas.kadiyala>javac -version
javac 1.8.0_261
Comment 2 Felix Schumacher 2020-12-06 10:19:51 UTC
Created attachment 37589 [details]
Fix regression from switching to ArrayList from LinkedList

While LinkedList happily accepts null as a value, the newer collections, like ArrayList, will throw exceptions on such occasions.

This is a regression introduced with b3b2eecc396d1fc38a4c4d1cf89e3c7ade1d95d7
Comment 3 Felix Schumacher 2020-12-06 11:13:06 UTC
@Srinivas could you test the next nightly and report back, whether your problem was fixed?

commit ba18592c39b1e8446eccfab2daf4d32a27a01422
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Sun Dec 6 11:27:40 2020 +0100

    When importing example test plan JMeter displays an NullPointerException
    
    Bugzilla Id: 64957
---
 .../src/main/java/org/apache/jmeter/gui/action/LoadRecentProject.java  | 3 +++
 xdocs/changes.xml                                                      | 1 +
 2 files changed, 4 insertions(+)
Comment 4 cafe.bistoule 2020-12-07 13:11:34 UTC
I just ran into this bug during my first try of jMeter.
After building from the current branch all is going well.
Felix, your fix seems to be ok.
Thanks to both of you.
Comment 5 Felix Schumacher 2020-12-17 20:03:22 UTC
*** Bug 65003 has been marked as a duplicate of this bug. ***
Comment 6 Felix Schumacher 2021-01-01 13:10:24 UTC
*** Bug 65045 has been marked as a duplicate of this bug. ***
Comment 7 Felix Schumacher 2021-01-12 08:43:33 UTC
*** Bug 65074 has been marked as a duplicate of this bug. ***
Comment 8 Sebastian Boga 2021-01-20 11:44:58 UTC
as a workaround we downgraded to 5.3
@Felix please push the 5.4.1 to prod as soon as possible