SceneBuilder LoadException

时间:2016-04-10 13:42:49

标签: java javafx scenebuilder

我一直在使用SceneBuilder,突然之间我无法打开我的fxml文件(仅使用SceneBuilder创建和编辑),因为LoadExpcetion:无效的属性。

有没有人可以看看xml然后告诉我,出了什么问题?

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.DesignerTool.commonInit(DesignerTool.java:513)
at com.oracle.javafx.authoring.DesignerTool.init(DesignerTool.java:457)
at com.oracle.javafx.authoring.SceneBuilderLauncher$RunningWithJMXInstance.launch(SceneBuilderLauncher.java:71)
at com.oracle.javafx.authoring.Main.start(Main.java:72)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:216)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
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: Invalid property.
at javafx.fxml.FXMLLoader$PropertyElement.<init>(FXMLLoader.java:1163)
at javafx.fxml.FXMLLoader.createElement(FXMLLoader.java:2372)
at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2345)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2164)
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)
... 21 more

fxml文件本身:http://pastebin.com/VtcJ5HKT

1 个答案:

答案 0 :(得分:0)

删除......

 <opaqueInsets>
   <Insets />
 </opaqueInsets>

中的第一个GridPane(第37-40行)修复了我的加载问题。

试一试:)