newspaint

Documenting Problems That Were Difficult To Find The Answer To

JMeter Could Not Initialize MenuFactory Class

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

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:

  • JMeterPlugins.jar

7 responses to “JMeter Could Not Initialize MenuFactory Class

  1. Ashok December 16, 2013 at 10:06 am

    Thanks.. I had a similar issue.. Now its resolved following your steps

  2. Swati February 12, 2014 at 10:35 am

    Thanks a lot. This really helped

  3. Bob April 11, 2014 at 12:13 pm

    Thanks for solution.

  4. Shachi April 28, 2014 at 10:10 pm

    I have downloaded JMeterPlugins-WebDriver.jar and dont see JMeterPlugins.jar in it. I am getting the same error

    [jmeter] Uncaught Exception java.lang.NoSuchMethodError: kg.apc.jmeter.gui.GuiBuilderHelper.strechButtonToComponent(Ljavax/swing/JComponent;Ljavax/swing/JButton;)V. See log file for details.
    
    [jmeter] Uncaught Exception java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.MenuFactory. See log file for details.
    
  5. Paras May 20, 2014 at 7:26 am

    thnx faced similar problm,working now

    • Ashu August 24, 2015 at 1:50 am

      Even I am facing issue while creating ultimate thread group , i placed jmeter plugin .jar and plugin extras .jar but when I start it shows following error

      Uncaught Exception java.lang.NoSuchMethodError: kg.apc.jmeter.gui.GuiBuilderHelper.strechButtonToComponent(Ljavax/swing/JComponent;Ljavax/swing/JButton;)V. See log file for details.
  6. vasudevan May 12, 2016 at 12:42 am

    I have downloaded and extracted apache jmeter version 2.7, when I run bin\jmeter.bat to start the application and could see the edit button is disabled and seeing the same error in the logs.

    016/05/12 10:32:43 FATAL - jmeter.JMeter: An error occurred:  java.lang.IllegalArgumentException: Unknown arg: C:\Vasu\Tools\apache-jmeter-2.7\bin\jmeter.log
    	at org.apache.jmeter.JMeter.initializeProperties(JMeter.java:596)
    	at org.apache.jmeter.JMeter.start(JMeter.java:291)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.jmeter.NewDriver.main(NewDriver.java:216)
    

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: