7
votes

When i am starting jmeter than it showing the follwing error An error occurred: null

My process to start jmeter is

root@L411:/opt/apache-jmeter-2.12/bin# sh jmeter An error occurred: null

4

4 Answers

7
votes

This happened to me as well. In my case, I was running Jmeter 2.13 on OpenJDK 1.8 on my 64-bit Linux machine. I fixed it by installing Oracle's Java instead, and switching to it with:

alternatives --config java

I'm a bit annoyed that I have to do this now, as it used to work before (I think).

6
votes

What OS are you using? I was getting the same error in Fedora 27 and I fixed it by installing the OpenJDK runtime environment (java-1.8.0-openjdk)

sudo dnf install java-1.8.0-openjdk
5
votes

If after executing jmeter.sh your apache-jmeter-x.xx/bin/jmeter.log contains something like

Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)

you probably have default-jdk-headless installed. Installing default package (sudo yum install java-1.8.0-openjdk) fixed the issue for me.

1
votes

I was getting this error on macOS High Sierra while running jMeter.

java.lang.NullPointerException
  at java.awt.Window.init

For me the problem was JVM not being able to identify a compatible graphics mode from the OS. To solve the problem I had to reset PRAM and NVRAM.

I followed this question and this answer.