添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Uncaught Exception java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.FileDialoger. See log file for details.

I installed apache-jmeter-5.1.1 and java 1.8.0_221 (8), and was walking through the getting started guide to build a web test plan in the GUI. But when I click save to save the Test Plan I receive the above error.

Full Output in debugger:

2019-07-24 15:30:13,306 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.FileDialoger
    at org.apache.jmeter.gui.action.Save.computeFileName(Save.java:203) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.gui.action.Save.doAction(Save.java:165) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:88) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:70) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
    at java.awt.event.InvocationEvent.dispatch(Unknown Source) ~[?:1.8.0_221]
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:1.8.0_221]
    at java.awt.EventQueue.access$500(Unknown Source) ~[?:1.8.0_221]
    at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_221]
    at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_221]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_221]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_221]
    at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:1.8.0_221]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_221]
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_221]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_221]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_221]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_221]
    at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_221]

Any idea how to resolve?

Possible duplicate of java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.MenuFactory – matias elgart Jul 24 '19 at 19:39 @matiaselgart Fresh install, I haven't been adding/changing any of the files in JMeter – Andrew Jul 24 '19 at 19:41 i would double, triple check your classpath as you're running JMeter. Seems like a missing or conflicting jar type of issue. Sorry can't be of more help. – matias elgart Jul 25 '19 at 2:39
  • Open JMeter -> Options -> Look and Feel -> Select any other theme other than Darcula.
  • Restart JMeter, Create test plan and try to save.
  • Save should work.
  • If You saw the error as below, after selecting Open project or Save project option

    java.lang.ExceptionInInitializerError: null
    at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:76) ~[ApacheJMeter_core.jar:5.1 r1853635]
    at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:45) ~[ApacheJMeter_core.jar:5.1 r1853635]
    at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:88) ~[ApacheJMeter_core.jar:5.1 r1853635]
    at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:70) ~[ApacheJMeter_core.jar:5.1 r1853635]
    

    on Windows 10 with jmeter 5.0 or higher then the solution:

  • JMeter -> Options -> Look and Feel -> Select any other theme other than Darcula.
  • Restart JMeter
  • Open/Save option should work
  • is probably the best for You.

    You just copy pasted the current answer and said it worked for you, which isn't a new answer. You should probably just give that answer a thumbs up rather than re-posting it. Or add a comment to that answer to say it worked for you in this other case as well. – Andrew Nov 28 '19 at 14:15

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.

    site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2020.3.20.36337