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

Cryptic error message when method name is missing the heading '#'

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u40
    • Fix Version/s: 7u40
    • Component/s: javafx
    • Labels:

      Description

      Create a new "JavaFx FXML Application" project from Netbeans, using the defaults.
      Open Sample.fxml with SB, drop a new Button.
      From the Code section set onAction to "newAction" method (you unfortunately forgot the heading '#').
      Add the method in the SampleController.java:
          private void newAction(ActionEvent event) {
              System.out.println("You clicked new Button!");
          }

      Start the project.
      You get an incomprehensible message : "Page language not specified." enclosed in exceptions (see below).

      This kind of issue can be very difficult to solve for a user.


      Page language not specified.
      file:/C:/Users/jcambon/Documents/NetBeansProjects/JavaFXApplication7/dist/JavaFXApplication7.jar!/javafxapplication7/Sample.fxml:13
        at javafx.fxml.FXMLLoader$Element.processEventHandlerAttributes(Unknown Source)
        at javafx.fxml.FXMLLoader$ValueElement.processEndElement(Unknown Source)
        at javafx.fxml.FXMLLoader.processEndElement(Unknown Source)
        at javafx.fxml.FXMLLoader.load(Unknown Source)
        at javafx.fxml.FXMLLoader.load(Unknown Source)
        at javafx.fxml.FXMLLoader.load(Unknown Source)
        at javafx.fxml.FXMLLoader.load(Unknown Source)
        at javafx.fxml.FXMLLoader.load(Unknown Source)
        at javafx.fxml.FXMLLoader.load(Unknown Source)
        at javafx.fxml.FXMLLoader.load(Unknown Source)
        at javafxapplication7.JavaFXApplication7.start(JavaFXApplication7.java:21)
        at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl$5.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
        at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:722)

      Exception in Application start method
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at com.javafx.main.Main.launchApp(Main.java:642)
      at com.javafx.main.Main.main(Main.java:805)
      Caused by: java.lang.RuntimeException: Exception in Application start method
      at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
      at com.sun.javafx.application.LauncherImpl.access$000(Unknown Source)
      at com.sun.javafx.application.LauncherImpl$1.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: javafx.fxml.LoadException: Page language not specified.
      at javafx.fxml.FXMLLoader$Element.processEventHandlerAttributes(Unknown Source)
      at javafx.fxml.FXMLLoader$ValueElement.processEndElement(Unknown Source)
      at javafx.fxml.FXMLLoader.processEndElement(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafxapplication7.JavaFXApplication7.start(JavaFXApplication7.java:21)
      at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$5.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
      at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
      ... 1 more
      Java Result: 1

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jcambon Jerome Cambon
                Reporter:
                jcambon Jerome Cambon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: