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

Files containing classpath relative URL are rejected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • javafx
    • None

      1) Start SB2
      2) Open the attached file
      => Scene Builder reports a load error and does open the file

      java.io.IOException: javafx.fxml.LoadException:
      /Users/elp/Downloads/classpath-relative-images.fxml:12

      at com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.load(FXOMLoader.java:84)
      at com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument.<init>(FXOMDocument.java:71)
      at com.oracle.javafx.scenebuilder.kit.editor.EditorController.updateFxomDocument(EditorController.java:1416)
      at com.oracle.javafx.scenebuilder.kit.editor.EditorController.setFxmlTextAndLocation(EditorController.java:455)
      at com.oracle.javafx.scenebuilder.app.DocumentWindowController.loadFromFile(DocumentWindowController.java:209)
      at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performOpenFiles(SceneBuilderApp.java:329)
      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:1089)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.handleOnActionMenu(MenuBarController.java:736)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.access$300(MenuBarController.java:79)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$9.handle(MenuBarController.java:729)
      at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$9.handle(MenuBarController.java:725)
      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: javafx.fxml.LoadException:
      /Users/elp/Downloads/classpath-relative-images.fxml:12

      at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2589)
      at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2567)
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2397)
      at com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.load(FXOMLoader.java:81)
      ... 33 more
      Caused by: java.lang.IllegalArgumentException: Invalid URL: Invalid URL or resource not found
      at javafx.scene.image.Image.validateUrl(Image.java:1094)
      at javafx.scene.image.Image.<init>(Image.java:671)
      at com.sun.javafx.fxml.builder.JavaFXImageBuilder.build(JavaFXImageBuilder.java:47)
      at com.sun.javafx.fxml.builder.JavaFXImageBuilder.build(JavaFXImageBuilder.java:37)
      at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:752)
      at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2811)
      at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2504)
      ... 35 more
      Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found
      at javafx.scene.image.Image.validateUrl(Image.java:1086)
      ... 41 more

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

              Created:
              Updated:
              Resolved:
              Imported: