JMeter Could Not Initialize MenuFactory Class
August 21, 2013
Posted by on
I was getting the following messages when starting JMeter:
Uncaught Exception java.lang.NoSuchMethodError: kg.apc.jmeter.gui.GuiBuilderHelper.strechButtonToComponent(Ljavax/swing/JComponent;Ljavax/swing/JButton;)V. See log file for details.
Uncaught Exception java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.MenuFactory. See log file for details.
In addition my Edit menu was greyed out in the JMeter window:
JMeter Edit Menu Greyed Out
The problem was that I had been placing a custom written Java sampler into the lib/ext/ subdirectory and that plugin was including a conflicting .jar in its .jar (you can put .jars inside .jars).
The solution? Remove the following file from the .jar plugin I created: