2 Replies Latest reply: Dec 19, 2012 8:43 AM by likejiujitsu RSS

    Scenebuilder cannot display Addressbook sample fxml - cannot find imports

    likejiujitsu
      This fails for both Scenebuilder 1.0 and 1.1

      The Addressbook tutorial at

      http://docs.oracle.com/javafx/2/fxml_get_started/fxml_tutorial_intermediate.htm#CACFEHBI

      Download the completed example from the link below and try to open the fxml file in scene builder.

      http://docs.oracle.com/javafx/2/fxml_get_started/FXMLTableView.zip

      *Missing types are: [fxmltableview.FormattedTableCellFactory]*

      Error loading file 'D:\Learn\JavaFX\FXMLTableView\src\fxmltableview\fxml_tableview.fxml'.
      D:\Learn\JavaFX\FXMLTableView\src\fxmltableview\fxml_tableview.fxml:0: error:     java.lang.ClassNotFoundException: fxmltableview.FormattedTableCellFactory

      There is already a

      <?import fxmltableview.*?>

      Just for kicks, I added

      <?import fxmltableview.FormattedTableCellFactory?>
      <?import fxmltableview.Person?>

      I also clicked the "Set up Classpath" and navigated to the folder and clicked Apply and tried to open it again.

      None of these worked.

      I removed the references to these classes thinking I can set them in Java code, but I get

      Caused by: java.lang.IllegalArgumentException: FXML root element is not a Tab or a Node

      com.oracle.javafx.authoring.persist.FXMLDocument$FxmlParseException: File is not a valid FXML file: D:\Learn\JavaFX\FXMLTableView\src\fxmltableview\fxml_tableview.fxml
           at com.oracle.javafx.authoring.persist.LoadFxml.loadElement(LoadFxml.java:162)
           at com.oracle.javafx.authoring.persist.LoadFxml.loadScreenData(LoadFxml.java:198)
           at com.oracle.javafx.authoring.Project.forFxml(Project.java:828)
           at com.oracle.javafx.authoring.Project.forFxml(Project.java:797)
           at com.oracle.javafx.authoring.DesignerTool.loadFXMLLayout(DesignerTool.java:171)
           at com.oracle.javafx.authoring.DesignerTool.loadFXMLLayout(DesignerTool.java:160)
           at com.oracle.javafx.authoring.DesignerTool.openExistingFxml(DesignerTool.java:371)
           at com.oracle.javafx.authoring.ApplicationMenu$6.handle(ApplicationMenu.java:415)
           at com.oracle.javafx.authoring.ApplicationMenu$6.handle(ApplicationMenu.java:412)
           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:1188)
           at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer$6.handle(ContextMenuContent.java:1139)
           at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer$6.handle(ContextMenuContent.java:1137)
           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:3324)
           at javafx.scene.Scene$MouseHandler.process(Scene.java:3164)
           at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3119)
           at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1559)
           at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2261)
           at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:228)
           at com.sun.glass.ui.View.handleMouseEvent(View.java:528)
           at com.sun.glass.ui.View.notifyMouse(View.java:922)
           at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
           at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
           at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
           at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.IllegalArgumentException: FXML root element is not a Tab or a Node
           ... 46 more

      Edited by: likejiujitsu on Dec 12, 2012 3:51 PM