Bug 65300 - Uncaught Exception java.lang.IllegalAccessError
Summary: Uncaught Exception java.lang.IllegalAccessError
Status: NEEDINFO
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.4.1
Hardware: PC All
: P2 major (vote)
Target Milestone: JMETER_5.5
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
: 65321 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-12 04:56 UTC by technovibe2019
Modified: 2021-05-21 15:47 UTC (History)
1 user (show)



Attachments
JEMETR LOG SNAPSHOT (231.87 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-05-12 04:57 UTC, technovibe2019
Details
jmeter log file with exception after clicking the Open button in GUI mode running jmeter.bat (5.70 KB, text/plain)
2021-05-17 16:55 UTC, jamie.maher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description technovibe2019 2021-05-12 04:56:27 UTC
I AM GETTING EXCEPTION ERROR WHILE OPENING A FILE IN JMETER and I COULDN'T ABLE TO DO ANY OPERATION IN JMETER


Uncaught Exception 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 in thread Thread[AWT-EventQueue-0,6,main]. See log file for details.


 ERRRO LOG FILE:

2021-05-12 10:20:44,995 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) [?:?]
Comment 1 technovibe2019 2021-05-12 04:57:35 UTC
Created attachment 37856 [details]
JEMETR LOG SNAPSHOT
Comment 2 Felix Schumacher 2021-05-12 18:10:24 UTC
Which version of Java are you using? It should be printed into jmeter.log.

What does your Java version print, when you start it with "java -version"?

Which Look&Feel are you using?

How are you starting JMeter?

(and as a side note, it would be nicer to attach the log files as text instead of graphics inside a word document)
Comment 3 jamie.maher 2021-05-17 16:53:34 UTC
I can confirm this bug happens also on 5.4.1 running Java 16 on Windows 10:

java -version
openjdk version "16" 2021-03-16
OpenJDK Runtime Environment AdoptOpenJDK (build 16+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 16+36, mixed mode, sharing)

I've worked around it by adding the following to the end of line 112 (JAVA9_OPTS) in jmeter.bat::
 --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED


so line 112 becomes:
set JAVA9_OPTS=--add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.desktop/sun.swing=ALL-UNNAMED --add-opens java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED

After adding that to the jmeter.bat file and running it JMeter 5.4.1 will display, and you can click the File Open button to display the dialog normally.

Thanks
Comment 4 jamie.maher 2021-05-17 16:55:48 UTC
Created attachment 37866 [details]
jmeter log file with exception after clicking the Open button in GUI mode running jmeter.bat
Comment 5 Felix Schumacher 2021-05-18 19:05:09 UTC
Could you try the next nightly or build from trunk and report back, if the problem is really gone?

commit e0e978704745080b2c516d0d33f951d51c571448
AuthorDate: Tue May 18 21:03:05 2021 +0200

    IllegalAccessError when opening file dialog with Java 16
    
    Bugzilla Id: 65300
---
 bin/jmeter        | 2 +-
 bin/jmeter.bat    | 2 +-
 bin/jmeter.sh     | 2 +-
 xdocs/changes.xml | 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)
Comment 6 Felix Schumacher 2021-05-21 15:47:08 UTC
*** Bug 65321 has been marked as a duplicate of this bug. ***