39

Below is the error i get,while clicking on open icon:

2021-05-20 12:11:25,651 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[AWT-EventQueue-0,6,main]
java.lang.IllegalAccessError: class com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge$DetailsTableModel (in unnamed module @0x21507a04) cannot access class sun.awt.shell.ShellFolder (in module java.desktop) because module java.desktop does not export sun.awt.shell to unnamed module @0x21507a04
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge$DetailsTableModel.updateColumnInfo(DarkFilePaneUIBridge.java:1128) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge$DetailsTableModel.<init>(DarkFilePaneUIBridge.java:1115) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge.getDetailsTableModel(DarkFilePaneUIBridge.java:576) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge$SortableListModel.<init>(DarkFilePaneUIBridge.java:1079) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePane.createList(DarkFilePane.java:137) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFileChooserUIBridge.createList(DarkFileChooserUIBridge.java:585) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFileChooserUIBridge$MetalFileChooserUIAccessor.createList(DarkFileChooserUIBridge.java:750) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge.setViewType(DarkFilePaneUIBridge.java:376) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge.propertyChange(DarkFilePaneUIBridge.java:890) ~[darklaf-core-2.5.4.jar:2.5.4]
    at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:342) ~[?:?]
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:334) ~[?:?]
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:267) ~[?:?]
    at java.awt.Component.firePropertyChange(Component.java:8713) ~[?:?]
    at javax.swing.JComponent.setUI(JComponent.java:688) ~[?:?]
    at javax.swing.JFileChooser.updateUI(JFileChooser.java:1838) ~[?:?]
    at javax.swing.JFileChooser.setup(JFileChooser.java:395) ~[?:?]
    at javax.swing.JFileChooser.<init>(JFileChooser.java:361) ~[?:?]
    at javax.swing.JFileChooser.<init>(JFileChooser.java:308) ~[?:?]
    at org.apache.jmeter.gui.util.FileDialoger.<clinit>(FileDialoger.java:42) ~[ApacheJMeter_core.jar:5.4.1]
    at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:75) ~[ApacheJMeter_core.jar:5.4.1]
    at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:44) ~[ApacheJMeter_core.jar:5.4.1]
    at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.4.1]
    at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.4.1]
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316) ~[?:?]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:721) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:715) ~[?:?]
    at java.security.AccessController.doPrivileged(AccessController.java:391) ~[?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) ~[?:?]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:740) ~[?:?]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]
Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
presty prajna
  • 390
  • 1
  • 3
  • 7

9 Answers9

61

Consider changing your JMeter Theme to Windows Classic(Options -> Look and Feel -> Windows classic)

32

The solution was changing the theme!

Try the following:

Open JMeter -> Options -> Look and Feel -> Select System theme.
Restart JMeter.
Hemant Thorat
  • 2,386
  • 20
  • 14
6

I had the same issue, found this workaround, which is not working for me:

adding the following to the JAVA9_OPTS variable in jmeter.bat: --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED

Source: https://bz.apache.org/bugzilla/show_bug.cgi?id=65300#c3

Instead, using the 5.5 snapshot of JMeter of today is working for me: https://ci-builds.apache.org/job/JMeter/job/JMeter-trunk/lastSuccessfulBuild/artifact/src/dist/build/distributions/

Christian Baumann
  • 3,188
  • 3
  • 20
  • 37
6

This might be related to the dark mode of JMeter. Atleast for me this solved the issue by changing it to non-dark theme. System Info : OS - macOS Big Sur Jmeter Version - 5.4.1 Java version - 16 Reference

Nayan
  • 316
  • 3
  • 2
  • Indeed. Its weird bug. There's an interesting article on this issue: https://programmerah.com/jmeter-cant-open-and-save-files-how-to-solve-29451/ – user2451016 Oct 19 '21 at 10:49
  • This is so ridiculous I used brew install and install by package and both were fixed with this theme change... – TurboAza Oct 22 '21 at 17:51
5

I had the same problem on my Mac and I fix it changing the theme to Nimbus.

I followed the steps that @Дмитрий Попов mentioned before. (Options -> Look and Feel -> Nimbus)

Jorge M
  • 71
  • 1
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 11 '21 at 19:09
3

Sounds like you're facing a JDK bug 482318, try changing your Java to another version, i.e.

  • Upgrade to Java 11 (it's LTS release)
  • Downgrade to Java 8 (it's the minimum version capable of running JMeter 5.4.1)

You can also try switching to cross-platform look and feel by running JMeter as:

jmeter -Jjmeter.laf=CrossPlatform ....

if it helps you can make the change permanent by adding the next line to user.properties file:

jmeter.laf=CrossPlatform

and last but not the least, you can open a .jmx script in GUI mode by providing it via -t argument like:

jmeter -t /path/to/your/test.jmx

this way JMeter will start and open your test plan (hopefully)

More information:

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

Adding the following to the JAVA9_OPTS variable in jmeter.bat: --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED

Source here.

After doing this step you have to open one existing jmx file from edit tab not from file tab. And after that your jmeter will start to work.

NOTE:Be careful! You have to change the jmeter.bat file. And also there are three JAVA9_OPTS words, you have to change the true one.

Ole Pannier
  • 3,208
  • 9
  • 22
  • 33
0

Changing theme to Windows Classic works, but it's impossible to do if the frame is empty.

Try to launch \apache-jmeter-5.4.3\bin\jmeter.bat. This should open jmeter no matter which theme is applied.

And then you could change theme to Windows classic if you prefer launch as ApacheJMeter.jar

  • This particular problem occurs even when you launch it through \apache-jmeter-5.4.3\bin\jmeter.bat. And the solution is to change the theme to any non-dark theme. – Dhiraj Mar 18 '22 at 14:39
0

I was able to open jmetter on Windows in the following way:

  1. Open cmd shell of windows.
  2. Go to path where bin directory of jmetter is. Path example:

C:\Users\xxxx\Documents\PROYECTOS\apache-jmeter-5.4.3\bin

  1. Write jmeter word and click Enter.

Note: Jmetter will open automatically.

  1. Click on: > Options -> Look and Feel -> Windows Classic (Example)

Picture

  1. Restart jmetter and then repeat 1, 2 and 3 steps.