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

Cannot load custom control sample from FXML Documentation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • 8
    • 8
    • javafx
    • None

    Description

      This was reported to the documentation group by a user.
      The custom_control.fxml file (attached) which is used in the "Mastering FXML" tutorial <http://docs.oracle.com/javafx/2/fxml_get_started/custom_control.htm>
       can be loaded by SB 1.1, but not by SB 2.0.

      When trying to show details on the load error dialog, I get the following trace:

      loader.getController()=com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.TextViewDialog@258860fc
      loader.getLocation()=jar:file:/Users/svienot/Projects/sb20/SceneBuilderKit/dist/SceneBuilderKit.jar!/com/oracle/javafx/scenebuilder/kit/editor/panel/util/dialog/AbstractModalDialogM.fxml
      Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1742)
      at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1625)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
      at javafx.event.Event.fireEvent(Event.java:203)
      at javafx.scene.Node.fireEvent(Node.java:8168)
      at javafx.scene.control.Button.fire(Button.java:185)
      at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
      at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
      at javafx.event.Event.fireEvent(Event.java:203)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3659)
      at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3384)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1652)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2443)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:314)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:243)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:345)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:526)
      at com.sun.glass.ui.View.notifyMouse(View.java:898)
      at com.sun.glass.ui.mac.MacApplication._enterNestedEventLoopImpl(Native Method)
      at com.sun.glass.ui.mac.MacApplication._enterNestedEventLoop(MacApplication.java:113)
      at com.sun.glass.ui.Application.enterNestedEventLoop(Application.java:495)
      at com.sun.glass.ui.EventLoop.enter(EventLoop.java:107)
      at com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(QuantumToolkit.java:543)
      at javafx.stage.Stage.showAndWait(Stage.java:414)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.AbstractModalDialog.showAndWait(AbstractModalDialog.java:119)
      at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performOpenFiles(SceneBuilderApp.java:349)
      at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performOpenFile(SceneBuilderApp.java:303)
      at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performControlAction(SceneBuilderApp.java:103)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$ApplicationControlActionController.perform(MenuBarController.java:1062)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.handleOnActionMenu(MenuBarController.java:709)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.access$300(MenuBarController.java:79)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$8.handle(MenuBarController.java:702)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$8.handle(MenuBarController.java:698)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
      at javafx.event.Event.fireEvent(Event.java:203)
      at javafx.scene.control.MenuItem.fire(MenuItem.java:462)
      at com.sun.javafx.scene.control.GlobalMenuAdapter$5.handle(GlobalMenuAdapter.java:158)
      at com.sun.javafx.scene.control.GlobalMenuAdapter$5.handle(GlobalMenuAdapter.java:156)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:203)
      at javafx.scene.control.MenuItem.fire(MenuItem.java:462)
      at com.sun.javafx.tk.quantum.GlassSystemMenu$6.action(GlassSystemMenu.java:234)
      Caused by: 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:483)
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
      at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1737)
      ... 79 more
      Caused by: java.lang.RuntimeException: Failed to load file:/Users/svienot/Projects/sb20/SceneBuilderKit/dist/SceneBuilderKit.jar!/com/oracle/javafx/scenebuilder/kit/editor/panel/util/dialog/AbstractModalDialogM.fxml
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractFxmlWindowController.makeRoot(AbstractFxmlWindowController.java:97)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractWindowController.getRoot(AbstractWindowController.java:82)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.AbstractModalDialog.getOKButton(AbstractModalDialog.java:338)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.AbstractModalDialog.isOKButtonVisible(AbstractModalDialog.java:156)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.AbstractModalDialog.setOKButtonVisible(AbstractModalDialog.java:160)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.TextViewDialog.<init>(TextViewDialog.java:62)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.ErrorDialog.showDetailsDialog(ErrorDialog.java:98)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.ErrorDialog.access$000(ErrorDialog.java:43)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.ErrorDialog$1.run(ErrorDialog.java:58)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.dialog.AlertDialog.actionButtonPressed(AlertDialog.java:108)
      ... 89 more
      Caused by: javafx.fxml.LoadException: Error resolving onAction='#actionButtonPressed', either the event handler is not in the Namespace or there is an error in the script.
      file:/Users/svienot/Projects/sb20/SceneBuilderKit/dist/SceneBuilderKit.jar!/com/oracle/javafx/scenebuilder/kit/editor/panel/util/dialog/AbstractModalDialogM.fxml:63

      at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2585)
      at javafx.fxml.FXMLLoader.access$100(FXMLLoader.java:99)
      at javafx.fxml.FXMLLoader$Element.processEventHandlerAttributes(FXMLLoader.java:599)
      at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:759)
      at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2811)
      at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2504)
      at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2413)
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2381)
      at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractFxmlWindowController.makeRoot(AbstractFxmlWindowController.java:92)
      ... 98 more

      Attachments

        Issue Links

          Activity

            People

              eleponn Eric Le Ponner
              svienot Simon Vienot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: