java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.MenuFactory
Asked Answered
L

3

39

when i open apache-jmeter-3.1 and right click the test-plan button,it turns out to be no response and throws lists of errors in the jmeter.log as follows

2016/12/17 16:24:30 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.MenuFactory
at org.apache.jmeter.control.gui.TestPlanGui.createPopupMenu(TestPlanGui.java:93)
at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:156)
at org.apache.jmeter.gui.tree.JMeterTreeListener.displayPopUp(JMeterTreeListener.java:248)
at org.apache.jmeter.gui.tree.JMeterTreeListener.mousePressed(JMeterTreeListener.java:193)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

what happened and how can i fix it? thanks !!! it has bothered me a long time...

Lagos answered 17/12, 2016 at 8:45 Comment(1)
verify that you are include all libsSimplehearted
A
4

Normally this happens when a Dependent jar is not present or in case if there is a conflicting jar with different implementation present.

Check this post https://newspaint.wordpress.com/2013/08/21/jmeter-could-not-initialize-menufactory-class/

Adjournment answered 17/12, 2016 at 9:45 Comment(1)
thank you very much. according to your anwser, i recognized there may have a confilcting jar. i tried to delete jars in /lib/ext one by one and finnaly found the ApacheJMeter_mail.jar effected the jmeter GUI launch.Lagos
H
126

I've got a similar issue. The solution was changing the theme!

Try the following:

  1. Open JMeter -> Options -> Look and Feel -> Select any other theme other than Darcula (E.g. System theme).
  2. Restart JMeter.

source: https://www.javaer101.com/en/article/5555703.html

Handhold answered 17/4, 2021 at 12:11 Comment(0)
A
4

Normally this happens when a Dependent jar is not present or in case if there is a conflicting jar with different implementation present.

Check this post https://newspaint.wordpress.com/2013/08/21/jmeter-could-not-initialize-menufactory-class/

Adjournment answered 17/12, 2016 at 9:45 Comment(1)
thank you very much. according to your anwser, i recognized there may have a confilcting jar. i tried to delete jars in /lib/ext one by one and finnaly found the ApacheJMeter_mail.jar effected the jmeter GUI launch.Lagos
A
0

I was not able to open any file. Ctrl + O was showing same error. Problem is solve by changing theme.

Akers answered 19/9, 2021 at 8:2 Comment(3)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Err
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewRadiator
This is the same solution as in this other answer. When answering older questions that already have answers, please make sure you provide either a novel solution or a significantly better explanation than existing answers.Engulf

© 2022 - 2024 — McMap. All rights reserved.