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

Using Netbeans "Make Controller" makes the fxml file non-loadable anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 7u40
    • javafx
    • None
    • SB 1.1, NB 7.4 RC1, JDK 7u40

      In NB 7.4RC1, create a new FXML Application project and specify to use a JDK7u40 platform, if it's not the default JavaFX platform already.

      Open the FXML document from NB to invoke SB 1.1. In SB window, add a new Button, specify "button1" for the fx:id property, set the onAction to "#HandleButton1Action", and save the FXML file.
      Back in NB, go into edit mode for the FXMLDocument.fxml file, select "Source > Make Controller" from the NB main menu.
      Doing this, one get in SB an xml parse error, trying to reload the fxml file (see screenshot attached).

      Relaunch SB, and try to open the fxml file. The file cannot be opened, and one get the following exception:


      com.oracle.javafx.authoring.persist.FXMLDocument$FxmlParseException: Failed to load FXML file
      at com.oracle.javafx.authoring.persist.FXMLDocument.makeParseException(FXMLDocument.java:400)
      at com.oracle.javafx.authoring.persist.FXMLDocument.load(FXMLDocument.java:311)
      at com.oracle.javafx.authoring.persist.FXMLDocument.checkLayout(FXMLDocument.java:239)
      at com.oracle.javafx.authoring.persist.FXMLDocument.checkLayout(FXMLDocument.java:224)
      at com.oracle.javafx.authoring.Project.forFxml(Project.java:835)
      at com.oracle.javafx.authoring.Project.forFxml(Project.java:807)
      at com.oracle.javafx.authoring.DesignerTool.loadFXMLLayout(DesignerTool.java:197)
      at com.oracle.javafx.authoring.DesignerTool.loadFXMLLayout(DesignerTool.java:185)
      at com.oracle.javafx.authoring.ApplicationMenu$93.handle(ApplicationMenu.java:2863)
      at com.oracle.javafx.authoring.ApplicationMenu$93.handle(ApplicationMenu.java:2860)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:28)
      at javafx.event.Event.fireEvent(Event.java:171)
      at javafx.scene.control.MenuItem.fire(MenuItem.java:456)
      at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1199)
      at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer$6.handle(ContextMenuContent.java:1148)
      at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer$6.handle(ContextMenuContent.java:1146)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
      at javafx.event.Event.fireEvent(Event.java:171)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3311)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3151)
      at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3106)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1563)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2248)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:250)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:173)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:292)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:530)
      at com.sun.glass.ui.View.notifyMouse(View.java:924)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
      at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: javafx.fxml.LoadException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[9,255]
      Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributeNSNotUnique?AnchorPane&controller&http://javafx.com/fxml/1
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2180)
      at com.oracle.javafx.authoring.persist.FXMLDocument$2.call(FXMLDocument.java:301)
      at com.oracle.javafx.authoring.util.Utils.withFXMLDefaultClassLoader(Utils.java:2216)
      at com.oracle.javafx.authoring.persist.FXMLDocument.load(FXMLDocument.java:298)
      ... 48 more
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[9,255]
      Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributeNSNotUnique?AnchorPane&controller&http://javafx.com/fxml/1
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
      at javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:88)
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2150)
      ... 51 more

            eleponn Eric Le Ponner
            jcambon Jerome Cambon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: