Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

What is this error?

Hi all,

I'm working through JavaFX, and I'm getting an odd error, even though I'm pretty sure my code is correct:

I've switched that original app I was using to load from FXML. Can you do me a favor and add a new Text node in the boombox.fxml file please? Make the text say "Boombox".

<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
<VBox fx:controller="com.example.Controller"
      xmlns:fx="http://javafx.com/fxml">

    <!-- Add your element below -->
    <Text text="Boombox" />


    <Button text="Play"/>
</VBox>

And here is the error I am receiving:

Bummer! java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: javafx.fxml.LoadException: /workdir/com/example/boombox.fxml:8 (Look around WaitForAsyncUtils.java line 150)

Any help would be greatly appreciated!

Alex

EDIT: Looks like restarting the browser allowed the challenge to work properly, the code above is correct. Not sure why I was getting that error previously.

Craig Dennis Could this be an error on Treehouse's end?

1 Answer

Spoiler Alert!

<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
<VBox fx:controller="com.example.Controller"
      xmlns:fx="http://javafx.com/fxml">

    <!-- Add your element below -->
  <Text text="Boombox" />


    <Button text="Play"/>
</VBox>