controlsfx
controlsfx copied to clipboard
ClassCastException when registering multiple validators inside a ScrollPane
Environment:
- RHEL 9.4
- Java 21 build 21.0.6+7-LTS
- JavaFX 21.0.3
- Jars used: controlsfx-11.2.2.jar javafx-base-21.0.3-linux.jar javafx-controls-21.0.3-linux.jar javafx-fxml-21.0.3-linux.jar javafx-graphics-21.0.3-linux.jar javafx-swing-21.0.3-linux.jar
If multiple calls are made to ValidationSupport.registerValidator() to multiple objects within a node in a ScrollPane, then the following exceptions appear:
java -cp .:jars/* --module-path jars --add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.swing,org.controlsfx.controls ValidatorTest
Exception in thread "JavaFX Application Thread" java.lang.reflect.InaccessibleObjectException: Unable to make protected javafx.collections.ObservableList javafx.scene.Parent.getChildren() accessible: module javafx.graphics does not "opens javafx.scene" to module org.controlsfx.controls
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:203)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:197)
at [email protected]/impl.org.controlsfx.ImplUtils.getChildrenReflectively(ImplUtils.java:148)
at [email protected]/impl.org.controlsfx.ImplUtils.getChildren(ImplUtils.java:125)
at [email protected]/org.controlsfx.control.decoration.GraphicDecoration.applyDecoration(GraphicDecoration.java:115)
at [email protected]/impl.org.controlsfx.skin.DecorationPane.showDecoration(DecorationPane.java:74)
at [email protected]/impl.org.controlsfx.skin.DecorationPane.addAllDecorationsOnNode(DecorationPane.java:119)
at [email protected]/impl.org.controlsfx.skin.DecorationPane.updateDecorationsOnNode(DecorationPane.java:70)
at [email protected]/org.controlsfx.control.decoration.Decorator.lambda$updateDecorationsOnNode$0(Decorator.java:165)
at [email protected]/org.controlsfx.control.decoration.Decorator.lambda$getDecorationPane$1(Decorator.java:205)
at [email protected]/org.controlsfx.control.decoration.Decorator$1.invalidated(Decorator.java:223)
at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:147)
at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
at [email protected]/javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(ReadOnlyObjectPropertyBase.java:80)
at [email protected]/javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:102)
at [email protected]/javafx.scene.Node$ReadOnlyObjectWrapperManualFire.fireSuperValueChangedEvent(Node.java:1044)
at [email protected]/javafx.scene.Node.invalidatedScenes(Node.java:1095)
at [email protected]/javafx.scene.Node.setScenes(Node.java:1133)
at [email protected]/javafx.scene.Parent.scenesChanged(Parent.java:773)
at [email protected]/javafx.scene.Node.invalidatedScenes(Node.java:1066)
at [email protected]/javafx.scene.Node.setScenes(Node.java:1133)
at [email protected]/javafx.scene.Parent.scenesChanged(Parent.java:773)
at [email protected]/javafx.scene.Node.invalidatedScenes(Node.java:1066)
at [email protected]/javafx.scene.Node.setScenes(Node.java:1133)
at [email protected]/javafx.scene.Parent.scenesChanged(Parent.java:773)
at [email protected]/javafx.scene.Node.invalidatedScenes(Node.java:1066)
at [email protected]/javafx.scene.Node.setScenes(Node.java:1133)
at [email protected]/javafx.scene.Parent$2.onChanged(Parent.java:373)
at [email protected]/com.sun.javafx.collections.TrackableObservableList.lambda$new$0(TrackableObservableList.java:44)
at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:327)
at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:71)
at [email protected]/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:246)
at [email protected]/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
at [email protected]/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
at [email protected]/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:210)
at [email protected]/javafx.collections.ModifiableObservableListBase.addAll(ModifiableObservableListBase.java:117)
at [email protected]/com.sun.javafx.collections.VetoableListDecorator.addAll(VetoableListDecorator.java:241)
at [email protected]/com.sun.javafx.collections.VetoableListDecorator.addAll(VetoableListDecorator.java:105)
at [email protected]/javafx.scene.control.skin.ScrollPaneSkin.initialize(ScrollPaneSkin.java:712)
at [email protected]/javafx.scene.control.skin.ScrollPaneSkin.<init>(ScrollPaneSkin.java:269)
at [email protected]/javafx.scene.control.ScrollPane.createDefaultSkin(ScrollPane.java:631)
at [email protected]/javafx.scene.control.Control.doProcessCSS(Control.java:910)
at [email protected]/javafx.scene.control.Control$1.doProcessCSS(Control.java:88)
at [email protected]/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:68)
at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
at [email protected]/javafx.scene.Parent.doProcessCSS(Parent.java:1401)
at [email protected]/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
at [email protected]/javafx.scene.Node.processCSS(Node.java:9555)
at [email protected]/javafx.scene.Scene.doCSSPass(Scene.java:587)
at [email protected]/javafx.scene.Scene.preferredSize(Scene.java:1786)
at [email protected]/javafx.scene.Scene$2.preferredSize(Scene.java:411)
at [email protected]/com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:65)
at [email protected]/javafx.stage.Window$12.invalidated(Window.java:1163)
at [email protected]/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
at [email protected]/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
at [email protected]/javafx.stage.Window.setShowing(Window.java:1239)
at [email protected]/javafx.stage.Window.show(Window.java:1254)
at [email protected]/javafx.stage.Stage.show(Stage.java:277)
at ValidatorTest.start(ValidatorTest.java:40)
at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:839)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:483)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at [email protected]/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$10(GtkApplication.java:263)
at java.base/java.lang.Thread.run(Thread.java:1583)
Oct 23, 2025 12:29:29 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-pane' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-pane>*.viewport' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-highlight-fill' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-inner-color' while resolving lookups for '-fx-text-fill' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-inner-color' while resolving lookups for '-fx-highlight-text-fill' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-prompt-text-fill' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-highlight-fill' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-inner-color' while resolving lookups for '-fx-text-fill' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-inner-color' while resolving lookups for '-fx-highlight-text-fill' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-prompt-text-fill' from rule '*.text-input' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar:vertical' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.increment-button' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-effect' from rule '*.scroll-bar:vertical>*.increment-button>*.increment-arrow' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.increment-button>*.increment-arrow' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.decrement-button' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-effect' from rule '*.scroll-bar:vertical>*.decrement-button>*.decrement-arrow' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.decrement-button>*.decrement-arrow' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar:vertical>*.thumb' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar:horizontal' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.increment-button' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-effect' from rule '*.scroll-bar:horizontal>*.increment-button>*.increment-arrow' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.increment-button>*.increment-arrow' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.decrement-button' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-effect' from rule '*.scroll-bar:horizontal>*.decrement-button>*.decrement-arrow' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.decrement-button>*.decrement-arrow' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.thumb' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Oct 23, 2025 12:29:30 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-pane>*.corner' in stylesheet jar:file:///whunter/test/validator/jars/javafx-controls-21.0.3-linux.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
ValidatorTest.fxml:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.GridPane?>
<BorderPane fx:controller="ValidatorTest" fx:id="container" prefWidth="400" prefHeight="50" xmlns:fx="http://javafx.com/fxml">
<center>
<ScrollPane>
<GridPane fx:id="contentPane">
<Label fx:id="firstNameLabel" text="First Name: "
GridPane.columnIndex="0" GridPane.rowIndex="0" GridPane.halignment="RIGHT"/>
<TextField fx:id="firstNameText" promptText="Enter first name"
GridPane.columnIndex="1" GridPane.rowIndex="0" GridPane.halignment="LEFT"/>
<Label fx:id="lastNameLabel" text="Last Name: "
GridPane.columnIndex="0" GridPane.rowIndex="1" GridPane.halignment="RIGHT"/>
<TextField fx:id="lastNameText" promptText="Enter last name"
GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.halignment="LEFT"/>
</GridPane>
</ScrollPane>
</center>
</BorderPane>
ValidatorTest.java:
import java.net.URI;
import java.net.URL;
import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import org.controlsfx.validation.ValidationSupport;
import org.controlsfx.validation.Validator;
public class ValidatorTest extends Application
{
private ValidationSupport support = null;
@FXML BorderPane container;
@FXML GridPane contentPane;
@FXML Label firstNameLabel;
@FXML TextField firstNameText;
@FXML Label lastNameLabel;
@FXML TextField lastNameText;
@Override
public void start(Stage stage) throws Exception
{
Parent root = FXMLLoader.load(URI.create("file:ValidatorTest.fxml").toURL());
Scene scene = new Scene(root, 400, 50);
stage.setTitle("Validator Test");
stage.setScene(scene);
stage.show();
}
public void initialize()
{
this.support = new ValidationSupport();
this.support.registerValidator(this.firstNameText, Validator.createEmptyValidator("Enter first name"));
this.support.registerValidator(this.lastNameText, Validator.createEmptyValidator("Enter last name"));
}
public static void main(String[] args)
{
ValidatorTest test = new ValidatorTest();
test.launch();
}
}
You can do something like
"--add-opens=javafx.graphics/javafx.scene.skin=ALL-UNNAMED",
"--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED",
Anyhow, I think the CssStyleHelper messages are a different topic.
"--add-opens=javafx.graphics/javafx.scene.skin=ALL-UNNAMED", "--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED",
This didn't resolve the problem.
I believe the CssStyleHelper messages are a side effect of the problem:
Exception in thread "JavaFX Application Thread" java.lang.reflect.InaccessibleObjectException: Unable to make protected javafx.collections.ObservableList javafx.scene.Parent.getChildren() accessible: module javafx.graphics does not "opens javafx.scene" to module org.controlsfx.controls
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:203)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:197)
at [email protected]/impl.org.controlsfx.ImplUtils.getChildrenReflectively(ImplUtils.java:148)