JPro-one / JPro

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

JFXDatePicker in jPro is showing error! #157

Closed ctoabidmaqbool closed 11 months ago

ctoabidmaqbool commented 1 year ago

When jfoenix -> datepicker is used in jpro hello project, it shows following error:

It maybe jfoenix related error or jpro specifix.

java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "value" is null
        at com.jfoenix.skins.JFXGenericPickerSkin.removeParentFakeFocusListener(JFXGenericPickerSkin.java:125)
        at com.jfoenix.skins.JFXGenericPickerSkin.<init>(JFXGenericPickerSkin.java:64)
        at com.jfoenix.skins.JFXDatePickerSkin.<init>(JFXDatePickerSkin.java:60)
        at com.jfoenix.controls.JFXDatePicker.createDefaultSkin(JFXDatePicker.java:100)
        at javafx.scene.control.Control.doProcessCSS(Control.java:886)
        at javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
        at com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
        at javafx.scene.Parent.doProcessCSS(Parent.java:1400)
        at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
        at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
        at javafx.scene.Node.processCSS(Node.java:9603)
        at javafx.scene.Scene.doCSSPass(Scene.java:587)
        at javafx.scene.Scene.preferredSize(Scene.java:1825)
        at javafx.scene.Scene$2.preferredSize(Scene.java:410)
        at com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:66)
        at javafx.stage.Window$12.invalidated(Window.java:1163)
        at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
        at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
        at javafx.stage.Window.setShowing(Window.java:1239)
        at javafx.stage.Window.show(Window.java:1254)
        at javafx.stage.Stage.show(Stage.java:277)
        at one.jpro.hellojpro.HelloJProFXML.start(HelloJProFXML.java:38)
        at com.jpro.internal.config.ApplicationStarter$.$anonfun$startJApplication$1(ApplicationStarter.scala:131)
        at com.jpro.internal.config.ApplicationStarter$.$anonfun$startJApplication$1$adapted(ApplicationStarter.scala:128)
        at com.jpro.internal.communicator.InstanceImpl.start(InstanceImpl.scala:39)
        at com.jpro.internal.communicator.InstanceImpl.$anonfun$new$2(InstanceImpl.scala:31)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at simplefx.cores.standard.parts.CoreTimeEvent.doIt$lzycompute$1(CoreTimeEvent.scala:147)
        at simplefx.cores.standard.parts.CoreTimeEvent.doIt$1(CoreTimeEvent.scala:145)
        at simplefx.cores.standard.parts.CoreTimeEvent.$anonfun$runOnceWhen$2(CoreTimeEvent.scala:149)
        at simplefx.cores.standard.parts.CoreTimeEvent.$anonfun$runOnceWhen$2$adapted(CoreTimeEvent.scala:149)
        at simplefx.cores.standard.parts.CoreTypesBindable$BindableImpl.$anonfun$triggerOnChange$3(CoreTypesBindable.scala:208)
        at simplefx.cores.standard.parts.CoreScheduler.runSchedulerImpl(CoreScheduler.scala:73)
        at simplefx.cores.standard.parts.CoreScheduler.runSchedulerImpl$(CoreScheduler.scala:52)
        at simplefx.cores.standard.Core.runSchedulerImpl(Core.scala:9)
        at simplefx.cores.standard.parts.CoreScheduler.tryStartSchedulerStop(CoreScheduler.scala:44)
        at simplefx.cores.standard.parts.CoreScheduler.tryStartSchedulerStop$(CoreScheduler.scala:42)
        at simplefx.cores.standard.Core.tryStartSchedulerStop(Core.scala:9)
        at com.jpro.internal.server.ViewSerializerActor$$anonfun$receive$2$$anonfun$applyOrElse$1.$anonfun$applyOrElse$2(ViewSerializerActor.scala:65)
        at simplefx.cores.standard.parts.CoreTimeEvent$$anon$3.run(CoreTimeEvent.scala:62)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
        at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
        at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
        at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.ClassCastException: class com.jfoenix.controls.FakeFocusJFXTextField cannot be cast to class com.sun.javafx.scene.control.FakeFocusTextField (com.jfoenix.controls.FakeFocusJFXTextField and com.sun.javafx.scene.control.FakeFocusTextField are in unnamed module of loader 'app')
        at javafx.scene.control.skin.ComboBoxPopupControl.lambda$new$2(ComboBoxPopupControl.java:140)
        at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:360)
        at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
        at javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(ReadOnlyBooleanPropertyBase.java:78)
        at javafx.scene.Node$FocusPropertyBase.notifyListeners(Node.java:8155)
        at javafx.scene.Node$17.notifyListeners(Node.java:8226)
        at javafx.scene.Node.notifyFocusListeners(Node.java:8176)
        at javafx.scene.Scene$12.invalidated(Scene.java:2241)
        at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
        at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
        at javafx.scene.Scene$KeyHandler.setFocusOwner(Scene.java:4114)
        at javafx.scene.Scene$KeyHandler.requestFocus(Scene.java:4175)
        at javafx.scene.Scene.requestFocus(Scene.java:2205)
        at javafx.scene.Node.requestFocus(Node.java:8406)
        at com.sun.javafx.scene.traversal.TopMostTraversalEngine.focusAndNotify(TopMostTraversalEngine.java:115)
        at com.sun.javafx.scene.traversal.TopMostTraversalEngine.traverseToFirst(TopMostTraversalEngine.java:139)
        at javafx.scene.Scene.focusInitial(Scene.java:2181)
        at javafx.scene.Scene$ScenePulseListener.focusCleanup(Scene.java:2513)
        at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2534)
        at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:411)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:410)
        at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:445)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:585)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:565)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:558)
        at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$12(QuantumToolkit.java:358)
        at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
        at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
        at java.base/java.lang.Thread.run(Thread.java:833)

How to fix it?

Note: Javafx -> datepicker works fine.

We are using:

implementation 'com.jfoenix:jfoenix:9.0.10'
implementation 'org.burningwave:core:12.48.0'
FlorianKirmaier commented 1 year ago

Does it work on Desktop with the latest JavaFX Version? I guess JFoenix is kind of no longer maintained. The last change was 2 years ago.

FlorianKirmaier commented 11 months ago

Closing for now. Feel free to reopen it when appropriate.