NullPointerException when using fx:include

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: 7u40
    • Component/s: javafx
    • Environment:

      Mac OS 10.8.4 (Retina)
      JDK 1.7.0_u40 ea b38

      FXMLLoader fails to load a sub layout using fx:include.

      Here is the parent.fxml:

      <AnchorPane xmlns:fx="http://javafx.com/fxml">
        <children>
          <fx:include source="/include.fxml"/>
        </children>
      </AnchorPane>

      Here is the include.fxml (empty pane):

      <AnchorPane xmlns:fx="http://javafx.com/fxml">
      </AnchorPane>

      At runtime I get the following stacktrace:

      Caused by: java.lang.NullPointerException
      at javafx.fxml.FXMLLoader.equals(FXMLLoader.java:1855)
      at javafx.fxml.FXMLLoader.isCyclic(FXMLLoader.java:1867)
      at javafx.fxml.FXMLLoader.access$2200(FXMLLoader.java:66)
      at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:935)
      at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:565)
      at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2348)
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2164)

            Assignee:
            Martin Sládeček
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: