Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8124196

FXML: forget namespace throw NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 7u6
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Environment:

      OsX 10.7

    • Subcomponent:

      Description

      In a little piece of include fxml, I get a NullPointerException.

      Here is the fxml (include in another fxml)

      <TableView fx:id="stocksList" >
      <columns>
      <TableColumn text="Titre" prefWidth="125">
      <cellValueFactory>
      <PropertyValueFactory property="test" />
      </cellValueFactory>
      </TableColumn>
      </columns>
      </TableView>

      I forgot the namespace xmlns:fx="http://javafx.com/fxml" and I get this error:

      Caused by: java.lang.NullPointerException
      at javafx.fxml.FXMLLoader.logException(FXMLLoader.java:2211)
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2030)
      at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:936)
      at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:565)
      at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2314)
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2131)

      The exception gives no direction about the problem and it's very difficult to find what is wrong.
      Maybe this problem must be check before.

        Attachments

          Activity

            People

            • Assignee:
              mkubec Milan Kubec (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: