#Cannot find the issue with my code.

1 messages · Page 1 of 1 (latest)

languid cometBOT
#

<@&987246399047479336> please have a look, thanks.

junior wharf
#
Caused by: java.lang.NullPointerException
at controllers.Controller.listGCUTours(Controller.java:58)

Check what's happening on line 58, you're calling a method on something that's null.

ancient totem
junior wharf
#

Can you share the full class, and have you placed a breakpoint on that line? Then you can check what's null.

ancient totem
#

here is the code

junior wharf
#

So that's your issue.

ancient totem
junior wharf
#

Does it exist in your form?

ancient totem
# junior wharf Does it exist in your form?

<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.ListView?>

<VBox xmlns="http://javafx.com/javafx"
      xmlns:fx="http://javafx.com/fxml"
      fx:controller="views.GCUTourListController">

    <ListView fx:id="tourListView" prefWidth="400" prefHeight="300"/>

</VBox>
#

I believe so