This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 237874 - fxml file generated by NB (Maven) cannot load into SceneBuilder
Summary: fxml file generated by NB (Maven) cannot load into SceneBuilder
Status: CLOSED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-01 01:22 UTC by cdavis
Modified: 2013-12-21 01:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cdavis 2013-11-01 01:22:11 UTC
I want to use a BorderPane as my Parent object for a NB  Maven FX project.  So if I create a new file with scene builder and overwrite the "Scene.fxml" file generated by NB, NB indicates it cannot be used with fx:controller.

If I use NB to create an empty FX file to replace the one generated with the project, scene builder cannot load it and throws an exception as follows:

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)

To be blunt, fxml is not robust in the current iterations of NB and SceneBuilder1.1 on 64 bit Linux.
Comment 1 Lou Dasaro 2013-11-01 08:33:12 UTC
Reporter: Please provide the fxml sample that is failing, along with your version info similar to below (from the About screens in NB and SB)

I am unable to duplicate the reported anomaly with either 7.4 or the most recent development build of Netbeans (20131031), and using Scene Builder 1.1 GA.

Steps taken: Created Maven JavaFX project. Created empty fxml file, and loaded it into SB. Deleted Scene.fxml. Created new Scene.fxml and associated it with existing controller. Loaded Scene.fxml into SB. No errors occurred at any time.

There are other errors that can occur though. Recommend using the latest development build of NetBeans. Several fixes probably affect your scenarios.

My test environment:

Product Version: NetBeans IDE 7.4 (Build 201310012201) and 
Product Version: NetBeans IDE Dev (Build 201310310001)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
also tried with JDK 1.7u45 and runtime  1.7.0_45-b18
System: Linux version 3.2.0-54-generic running on amd64; UTF-8; en_US (nb) (Ubuntu 12.04 64-bit)

JavaFX Scene Builder 1.1-b35, Changeset: 50e3d7cdf394 Date: 2013-08-27 10:39
Comment 2 cdavis 2013-11-03 23:03:14 UTC
Well, I just tried it and it worked flawlessly so I don't know what my problem was.  Perhaps something I ate for breakfast that morning?  :)

I'm using 7.4 on 1.7U40 64 bit Linux.
Comment 3 cdavis 2013-11-03 23:17:34 UTC
Well, seems I was too quick.

1)  Create Maven FX application project
2)  Delete Scene.fxml
3)  Uing NB create new empty FXML file:  right click on resources -> new -> Other -> JavaFX -> empty FXML file
4)  Right click on new file -> Open

Scene builder will not open the file.

My envirnoment as stated before:

64 bit Linux:
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
SceneBuilder1.1

I note your JDK is b56.  I guess I'll update to 1.7u45 and see what happens though I don't see how that would help SceneBuilder open an empty FXML file.
Comment 4 Lou Dasaro 2013-11-04 00:11:51 UTC
Recommend you try using the latest development build of NetBeans. Several fixes probably affect your scenarios. See for example Bug 236509 and six related bugs which are fixed in development builds (but not fixed in 7.4).
Comment 5 Lou Dasaro 2013-11-04 00:25:21 UTC
Reporter, please upload the Scene.fxml that won't load in Scene Builder as an attachment to this report.  

Also, can you confirm you are using Scene Builder 1.1-b35, Changeset: 50e3d7cdf394 Date: 2013-08-27 10:39 ?
Comment 6 Lou Dasaro 2013-12-12 09:11:43 UTC
I haven't heard back from reporter in a month, and since it works for me, I am changing status to WORKSFORME. Feel free to reopen with pertinent details if the anomaly still presents.
Comment 7 cdavis 2013-12-21 01:20:46 UTC
(In reply to Lou Dasaro from comment #6)
> I haven't heard back from reporter in a month, and since it works for me, I
> am changing status to WORKSFORME. Feel free to reopen with pertinent details
> if the anomaly still presents.

It seems to be working fine now.  Changing status to CLOSED