0

I have an issue with Scene Builder, as I try to open one of my project FXML files in it, and all the time I get the following error message

[error message][1].

The file works, when I run it in the JVM, it just can't open in the Scene Builder.

The contents of the file are below:

<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXCheckBox?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>

<AnchorPane prefHeight="600.0" prefWidth="1300.0" 
xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" 
fx:controller="smartdocClient.controller.CreateDoctorController">
   <children>
  <ImageView fitHeight="112.0" fitWidth="112.0" layoutX="72.0" layoutY="46.0">

  <Button layoutX="1159.0" layoutY="46.0" mnemonicParsing="false" 
 onAction="#backButtonPressed" prefHeight="35.0" prefWidth="86.0" text="Back">
     <font>
        <Font size="16.0" />
     </font>
  </Button>
  <JFXTextField layoutX="254.0" layoutY="339.0" promptText="Phone Number" fx:id="phoneNo"/>
</children>
</AnchorPane>

I've been working on this project with my friend through GitHub, but some of the fxml files he's made can be open, others don't though. All of these files are in the same folder.

there is also the error message below thrown from

at com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.load(FXOMLoader.java:97)
at com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument.<init>(FXOMDocument.java:85)
at com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument.<init>(FXOMDocument.java:102)
at com.oracle.javafx.scenebuilder.kit.editor.EditorController.updateFxomDocument(EditorController.java:2540)
at com.oracle.javafx.scenebuilder.kit.editor.EditorController.setFxmlTextAndLocation(EditorController.java:761)
at com.oracle.javafx.scenebuilder.app.DocumentWindowController.loadFromFile(DocumentWindowController.java:386)
at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performOpenFiles(SceneBuilderApp.java:658)
at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performOpenFile(SceneBuilderApp.java:594)
at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performControlAction(SceneBuilderApp.java:203)
at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$ApplicationControlActionController.perform(MenuBarController.java:1770)
at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.handleOnActionMenu(MenuBarController.java:1214)
at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.lambda$new$4(MenuBarController.java:1208)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.controls/javafx.scene.control.MenuItem.fire(MenuItem.java:465)
at javafx.controls/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1380)
at javafx.controls/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(ContextMenuContent.java:1333)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)

and there is the full message of an error

fabian
  • 80,457
  • 12
  • 86
  • 114
Skorejen
  • 363
  • 1
  • 5
  • 15
  • The error dialog has a `Show Details` button, could you edit your question to include those details? Preferably as text, not an image. – M. le Rutte May 15 '18 at 13:53
  • Probably need to import the `JFoenix` library/jar into `SceneBuilder`. – SedJ601 May 15 '18 at 14:03
  • https://stackoverflow.com/questions/25612493/is-it-possible-to-import-a-jar-containing-a-custom-javafx-control-into-scene-bui – SedJ601 May 15 '18 at 14:04
  • Ok, I passed the error message, not full though as, there's too much code - stack tells me D: I'll try to read about this question you posted, but the problem is, I can open some other fxml files, it's just two or three that cannot be open - including this one. – Skorejen May 15 '18 at 14:11
  • @skorejen Did you import JFoenix into SceneBuilder? – Aaron Stein May 15 '18 at 15:15
  • Fixed the problem by importing the JFoenix into SceneBuilder, thank you so much!! – Skorejen May 15 '18 at 16:42
  • The fxml snippet contains at least one error: The `` element is never closed making the fxml file not well formed. (Aside from the fact that `Button` is not assignable to the default property of `ImageView` which is image and even if the fxml was valid it makes only little sense to include a `ImageView` with no `image` or `fx:id`.) Also why didn't you post the stacktrace from the screenshot as text. There is a *Copy* button at the bottom after all... – fabian May 15 '18 at 17:02

1 Answers1

-1

I removed the and it worked, just left it blank and it worked, had the same problem.