Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
andre-schneider-fraunhofer opened this issue Mar 26, 2019 · 6 comments
Labels
JDK 12 Java 12 compatibility issues wontfix

Comments

@andre-schneider-fraunhofer

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é

@stale
Copy link

stale bot commented Nov 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 18, 2019
@stale stale bot closed this as completed Nov 25, 2019
@tobiasdiez
Copy link

This issue is still present, I think.

@1-alex98
Copy link

1-alex98 commented May 3, 2020

Still exists

@littleboyonearth
Copy link

the same for java 15

@Rozumek29
Copy link

same for JFXTimePicker and java 15

@jlangvand
Copy link

jlangvand commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JDK 12 Java 12 compatibility issues wontfix
Projects
None yet
Development

No branches or pull requests

8 participants