In my case all of the above were not the problem at all.
My problem was solved when I replaced :
getClass().getResource("ui_layout.fxml")
with :
getClass().getClassLoader().getResource("ui_layout.fxml")
In my case all of the above were not the problem at all.
My problem was solved when I replaced :
getClass().getResource("ui_layout.fxml")
with :
getClass().getClassLoader().getResource("ui_layout.fxml")