title: JavaFX loading FXML causes warning and fails to load the file (skin/modena)
body: <h1>Situation</h1>
  <p>I'm trying to build a JavaFX App and for GUI I use SceneBuilder to produce fxml files for the different roots to use. Then I launch the App and at some point I'm trying to load some fxml file with <code>new FXMLLoader(App.class.getResource(&quot;myFXML.fxml&quot;)).load()</code> and set it as root on the scene on the stage.</p>
  <hr />
  <h1>Issue</h1>
  <p>99% of the times the loading has no problem at all and everything works as intended, but that 1% will fail and prevent the fxml loading without stopping the App but only throws the warning bellow.</p>
  <pre><code>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 javafx.graphics@18 of loader 'app')' while converting value for 
  '-fx-background-color' from rule '*.list-view' in stylesheet 
  jar:file:///C:/mysystem/.m2/repository/org/openjfx/javafx-controls/18/javafx-controls-18-win.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
  </code></pre>
  <p>The fxml that causes it most of the time is the one with a ComboBox in it but i don't think this has to do with it since it happened anywhere.</p>
  <p><strong>Important</strong> the warning is not consistent as well, at the pre-last line instead of <code>*.list-view</code> other times says <code>*.button</code> as well, but i am doing the same action to test it.</p>
  <hr />
  <h1>Reproducing the Issue</h1>
  <p>Reproducing is not consistent at all, the warning is descriptive and seems that the problem is on a JavaFX file (mentioned in the warning) and not in something I wrote. Thus I can't find a consistent way to reproduce it or handle the exception or something.</p>
  <hr />
  <h1>Tried so far</h1>
  <ul>
  <li>Removing the ComboBox (just in case)</li>
  <li>Searched the internet to find nothing about it</li>
  <li>Re-installing JDK did nothing</li>
  </ul>
  <hr />
  <h3>Note</h3>
  <p>I know there is much more information I can provide that may help but I'm exhausted right now. Maybe will add with edit later on.</p>