Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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>