[Issue]: Nullpointer at ValueReplacer
See original GitHub issueWhat happened?
Expect
Sending Kafka messages with a key that uses a changing UUID.
- The function
${__UUID()}
of JMeter is to be used for this. - Variables
${TEST_VAR}
can also not be used as an alternative.
Result
A NullPointerException always occur in this case.
More information
KloadGen: 5.1.1 JMeter: 5.5 Schema: Is not required Testplan: Nullpointer.zip (Minimal test plan. A running Kafka is not required to produce the NullPointerException)
KloadGen Version
5.1.1
Relevant log output
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: About to replace in property of type: class org.apache.jmeter.testelement.property.StringProperty: KLG - Value Plain - VARIABLE - ❌
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: Replacement result: KLG - Value Plain - VARIABLE - ❌
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: About to replace in property of type: class org.apache.jmeter.testelement.property.BooleanProperty: true
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: Won't replace true
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: About to replace in property of type: class org.apache.jmeter.testelement.property.StringProperty: ${TEST_VAR}
2022-09-29 13:59:35,202 DEBUG o.a.j.t.p.AbstractProperty: Not running version, return raw function string
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: Replacement result: ${TEST_VAR}
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: About to replace in property of type: class org.apache.jmeter.testelement.property.StringProperty: org.apache.kafka.common.serialization.StringSerializer
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: Replacement result: org.apache.kafka.common.serialization.StringSerializer
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: About to replace in property of type: class org.apache.jmeter.testelement.property.StringProperty:
2022-09-29 13:59:35,202 DEBUG o.a.j.e.u.ValueReplacer: Replacement result:
2022-09-29 13:59:35,202 DEBUG o.a.j.t.p.AbstractProperty: Not running version, return raw function string
2022-09-29 13:59:35,202 DEBUG o.a.j.t.p.AbstractProperty: Not running version, return raw function string
2022-09-29 13:59:35,202 DEBUG o.a.j.p.j.s.JavaSampler: StandardJMeterEngine@6ec2ddb3-Java Request testStarted
2022-09-29 13:59:35,202 INFO o.a.j.p.j.s.JavaSampler: Created class: net.coru.kloadgen.sampler.KafkaSchemaSampler. Uses tearDownTest:
2022-09-29 13:59:35,203 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2022-09-29 13:59:35,203 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[StandardJMeterEngine,6,main]
java.lang.NullPointerException: null
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:994) ~[jorphan.jar:5.5]
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:994) ~[jorphan.jar:5.5]
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:976) ~[jorphan.jar:5.5]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:405) ~[ApacheJMeter_core.jar:5.5]
at java.lang.Thread.run(Thread.java:834) ~[?:?]
Have you added your JMX Testplan or a replica?
- I have added a JMX testplan
Have you added your Schema or a replica?
- I have added the Schema
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
String Replace() giving null pointer exception - Stack Overflow
replace () I want To replace a Charecter From File And Write The Changed Content To Other File.. even though its easy i...
Read more >java.lang.NullPointerException: replacement == null ... - GitHub
ThirdPartyInvoice.createThirdPartyReturnUrl() method, when the app tries to call the replace() method on a String object, passing a null value ...
Read more >Null Pointer Exception In Java - GeeksforGeeks
NullPointerException is thrown when program attempts to use an object reference that has the null value.
Read more >String replace method error (Example) | Treehouse Community
My code (the comments on the right is the value of the variable: // get user data from session HashMap<String, String> user =...
Read more >Use the Safe Navigation Operator to Avoid Null Pointer ...
Use the safe navigation operator (?.) to replace explicit, sequential checks for null references. This new operator short-circuits expressions that attempt ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @fabianAtruvia ,
Thank you for your report. We already know about this error and we are working to fix it. We let you know as soon as we have a solution.
Hi @fabianAtruvia,
there is a PR which will solve this issue. You can test it before merge if you like.
Cheers!