Skip to content
Advertisement

Jmeter NullPointerException when running the GUI

I have installed Jmeter using

brew install Jmeter

when I run

jmeter

from command line i get this error:

mac@macbook ~ $ jmeter
================================================================================ 
Don't use GUI mode for load testing !, only for Test creation and Test
debugging. For load testing, use CLI Mode (was NON GUI):    
 jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder] & increase Java Heap to meet your test requirements:    Modify current
env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the
jmeter batch file Check :
https://jmeter.apache.org/usermanual/best-practices.html
================================================================================ 
An error occurred: null

I checked the jmeter.log file and this is what I get:

2019-12-03 09:48:06,190 ERROR o.a.j.JMeter: An error occurred: 
java.lang.NullPointerException: null  at
java.awt.Window.init(Window.java:497) ~[?:1.8.0_231]  at
java.awt.Window.<init>(Window.java:537) ~[?:1.8.0_231]    at
java.awt.Frame.<init>(Frame.java:420) ~[?:1.8.0_231]  at
java.awt.Frame.<init>(Frame.java:385) ~[?:1.8.0_231]  at
javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1763)
~[?:1.8.0_231]    at
javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1838)
~[?:1.8.0_231]    at javax.swing.JWindow.<init>(JWindow.java:187)
~[?:1.8.0_231]    at javax.swing.JWindow.<init>(JWindow.java:139)
~[?:1.8.0_231]    at
org.apache.jmeter.SplashScreen.<init>(SplashScreen.java:45)
~[ApacheJMeter_core.jar:5.2.1]    at
org.apache.jmeter.JMeter.startGui(JMeter.java:376)
~[ApacheJMeter_core.jar:5.2.1]    at
org.apache.jmeter.JMeter.start(JMeter.java:545)
[ApacheJMeter_core.jar:5.2.1]     at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_231]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_231]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_231]    at java.lang.reflect.Method.invoke(Method.java:498)
~[?:1.8.0_231]    at
org.apache.jmeter.NewDriver.main(NewDriver.java:253)
[ApacheJMeter.jar:5.2.1]

Java version:

java version "1.8.0_231" Java(TM) SE Runtime Environment (build
1.8.0_231-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

anyone was able to fix this?

Advertisement

Answer

Can it be the case you’re using DisplayLink? If so, most probably you’re suffering from Java Apps crash on launch if connected to external DisplayLink device issue.

According to the 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article:

Use Up-to-Date Software

Your test might fail if your software is out of date. Make sure you’re using the most recent versions of the following:

Java – use the latest 64-bit version of Java SE JDK or Server JRE where possible

So if you have to stay at Java 8 – consider upgrading to Java SE Development Kit 8u231 (or whatever is the latest stable patch level), otherwise obtain the latest version of Java Runtime Environment or SDK

If you cannot amend Java version – consider removing this DisplayLink device.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement