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.

Incompatibilities between JFoenix 9.0.8 and OpenJFX 12 / OpenJDK 12 (JFXDatePicker, JFXTimePicker)

See original GitHub issue

I found two incompatibilities between JFoenix 9.0.8 and OpenJFX 12. I have trouble at least with two classes: JFXDatePicker and JFXTimePicker. Both classes use ReflectionHelper in order to access ?private? members of the super classes DatePicker and TimePicker from the javafx.scene.controls package.

I guess there are a few changes in OpenJDK 12 as well as OpenJFX 12 and now the JFoenix implementation has to be adapted.

Problem #1: JFXDatePicker line 84, NullPointerException while accessing the private “editor” field from the parent class.

Problem #2: JFXTimePicker … see exception below …

Exception in thread "JavaFX Application Thread" java.lang.InternalError: java.lang.IllegalAccessException: class com.jfoenix.adapters.ReflectionHelper cannot access a member of class javafx.scene.control.skin.ComboBoxPopupControl (in module javafx.controls) with modifiers ""
	at com.jfoenix.adapters.ReflectionHelper.invoke(ReflectionHelper.java:62)
	at com.jfoenix.skins.JFXGenericPickerSkin.removeParentPopupHandlers(JFXGenericPickerSkin.java:140)
	at com.jfoenix.skins.JFXGenericPickerSkin.<init>(JFXGenericPickerSkin.java:91)
	at com.jfoenix.skins.JFXTimePickerSkin.<init>(JFXTimePickerSkin.java:53)
	at com.jfoenix.controls.JFXTimePicker.createDefaultSkin(JFXTimePicker.java:92)
	at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
	at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
	at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
	at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
	at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9540)
	at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9533)
	at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9533)
	at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9533)
	at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9533)
	at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9533)
	at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9533)
	at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:569)
	at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2477)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:562)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:542)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:535)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:341)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.IllegalAccessException: class com.jfoenix.adapters.ReflectionHelper cannot access a member of class javafx.scene.control.skin.ComboBoxPopupControl (in module javafx.controls) with modifiers ""
	at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:355)
	at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:639)
	at java.base/java.lang.reflect.Method.invoke(Method.java:559)
	at com.jfoenix.adapters.ReflectionHelper.invoke(ReflectionHelper.java:60)
	... 29 more

Are there any ideas how I can solve the problems or are there any work-arounds?

Thanks, André

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

2reactions
littleboyonearthcommented, Feb 8, 2021

the same for java 15

0reactions
jlangvandcommented, Apr 16, 2021

Workaround tested on Java 15

From build.gradle:

def args = [
    "--add-exports=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED",
    "--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior" +
        "=ALL-UNNAMED",
    "--add-exports=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED",
    "--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior" +
        "=com.jfoenix",
    "--add-exports=javafx.controls/com.sun.javafx.binding=com.jfoenix",
    "--illegal-access=warn",
    "--add-opens=javafx.controls/javafx.scene.control.skin=com.jfoenix",
    "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
    "--add-opens=java.base/java.lang.reflect=com.jfoenix",
    "--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior" +
        "=com.jfoenix",
    "--add-exports=javafx.controls/com.sun.javafx.scene.control=com.jfoenix",
    "--add-exports=javafx.base/com.sun.javafx.binding=com.jfoenix",
    "--add-exports=javafx.graphics/com.sun.javafx.stage=com.jfoenix",
    "--add-exports=javafx.base/com.sun.javafx.event=com.jfoenix"
]

application {
  mainClass = (main class)
  applicationDefaultJvmArgs = args
}

I believe someone on my team found those arguments on StackOverflow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatibilities between JFoenix 9.0.8 and OpenJFX 12 ...
I found two incompatibilities between JFoenix 9.0.8 and OpenJFX 12. I have trouble at least with two classes: JFXDatePicker and ...
Read more >
JFoenix - Bountysource
I found two incompatibilities between JFoenix 9.0.8 and OpenJFX 12. I have trouble at least with two classes: JFXDatePicker and JFXTimePicker.
Read more >
JavaFX
JavaFX. JavaFX is an open source, next generation client application platform for desktop, mobile and embedded systems built on Java. It is a...
Read more >
Cannot able to drag and drop JFXTimePicker control
Recently I downloaded the jfoenix(version 9.0.10) library. It worked fine so far. But when I tried to drag and drop JFXTimePicker in the ......
Read more >
JFoenix Tutorial | JFXDatePicker, JFXTimePicker ... - YouTube
This video tutorial is about JFoenix JFXDatePicker, JFXTimePicker. JFoenix is open source library that is freely available on GitHub for use ...
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