question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.IllegalAccessError when usind controlsfx with JavaFX in Java 11

See original GitHub issue

I am trying to use org.controlsfx.control.textfield.AutoCompletionBinding along with JavaFX in Java 11. This is my maven dependency:

<dependency>
        <groupId>org.controlsfx</groupId>
        <artifactId>controlsfx</artifactId>
        <version>11.0.1</version>
</dependency>

And my module-info.java:

open module gui {
    requires javafx.controls;
    requires javafx.fxml;
    requires javafx.base;
    requires javafx.graphics;

    requires org.controlsfx.controls;
}
Exception in thread "JavaFX Application Thread" java.lang.IllegalAccessError: class org.controlsfx.control.textfield.AutoCompletionBinding (in module org.controlsfx.controls) cannot access class com.sun.javafx.event.EventHandlerManager (in module javafx.base) because module javafx.base does not export com.sun.javafx.event to module org.controlsfx.controls
	at org.controlsfx.controls/org.controlsfx.control.textfield.AutoCompletionBinding.<init>(AutoCompletionBinding.java:525)
	at org.controlsfx.controls/impl.org.controlsfx.autocompletion.AutoCompletionTextFieldBinding.<init>(AutoCompletionTextFieldBinding.java:107)
	at org.controlsfx.controls/impl.org.controlsfx.autocompletion.AutoCompletionTextFieldBinding.<init>(AutoCompletionTextFieldBinding.java:92)
	at org.controlsfx.controls/org.controlsfx.control.textfield.TextFields.bindAutoCompletion(TextFields.java:187)
	at gui/de.markant.mase.gui.department.edit.DepartmentEditGUIController.initSupervisor(DepartmentEditGUIController.java:140)
	at gui/de.markant.mase.gui.department.edit.DepartmentEditGUIController.init(DepartmentEditGUIController.java:94)
	at gui/de.markant.mase.gui.department.edit.DepartmentEditGUI.<init>(DepartmentEditGUI.java:31)
	at gui/de.markant.mase.gui.department.DepartmentGUIController.openEdit(DepartmentGUIController.java:175)
	at gui/de.markant.mase.gui.department.DepartmentGUIController.lambda$initButtonListeners$5(DepartmentGUIController.java:98)
	at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
	at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3851)
	at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
	at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1849)
	at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
	at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556)
	at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
	at java.base/java.lang.Thread.run(Thread.java:834)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Siedlerchrcommented, May 19, 2022

Still an issue with javafx18 and jdk18 and controlsfx11

0reactions
pitzzahhcommented, Nov 4, 2022

There is this wiki page for debugging these kinds of errors, which might help you.

This actually fixed it. Thank you very much, sorry for being dumb.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ControlsFX11 BreadCrumbBar Issue Using Java 11 JavaFX14
I recently upgraded to Java 11 and came across the error below while using ControlsFX 11.0.1. I have tested on both JavaFX 14...
Read more >
java.lang.IllegalAccessError with JFoenix and JavaFX in Java 11
I am trying to use com.jfoenix.controls.JFXChipView along with JavaFX in Java 11. This is my maven dependency:
Read more >
java.lang.IllegalAccessError: class impl.org.controlsfx.skin ...
I have an old Java 1.8 (Oracle) JavaFX project, using ControlsFX 8.40.12. And that all runs fine. But I'm now trying to modernize...
Read more >
e(fx)clipse » Java 11 e4 application :IllegalAccessError - Eclipse
I migrate a big e4 application to java 11, efxclipse 3.6.2 and ... with only bundled javafx-modules without using javafx installation path.
Read more >
How to run ControlsFX Java 11 and JavaFX 11? - Reddit
Hi, does someone has experience in running ControlsFX with JavaFX 11 ? I dont get it to run, getting compile errors all the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found