运行GUI时出现Jmeter NullPointerException [英] Jmeter NullPointerException when running the GUI
问题描述
我已经使用安装了Jmeter
I have installed Jmeter using
简单安装Jmeter
brew install Jmeter
我跑步时
jmeter
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
我检查了jmeter.log文件,这就是我得到的:
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版本:
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?
推荐答案
是否可能是您正在使用 DisplayLink ?如果是这样,很可能您是受如果与外部DisplayLink设备问题.
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.
根据文章:
使用最新软件
如果您的软件已过期,则您的测试可能会失败.确保您使用的是以下最新版本:
Your test might fail if your software is out of date. Make sure you’re using the most recent versions of the following:
Java -尽可能使用Java SE JDK或Server JRE的最新64位版本
Java - use the latest 64-bit version of Java SE JDK or Server JRE where possible
因此,如果您必须使用Java 8,请考虑升级到 Java运行时环境或SDK
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
如果您不能修改Java版本,请考虑删除此DisplayLink设备.
If you cannot amend Java version - consider removing this DisplayLink device.
这篇关于运行GUI时出现Jmeter NullPointerException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!