I generated an FXML using scene builder. Now the problem is when I try to integrate it I get a bunch of exception lines. Does anyone else stumble upon this problem ?
Apr 23, 2012 2:33:40 AM javafx.fxml.FXMLLoader logException
SEVERE: The following error occurred at line 31 in file /C:/Users/gulcoza/Documents/NetBeansProjects/Commerce/build/classes/commerce/Login.fxml[Ljava.lang.StackTraceElement;@1d59bc95
Exception in Application start method
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:601)
at com.javafx.main.Main.launchApp(Main.java:453)
at com.javafx.main.Main.main(Main.java:537)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.access$000(Unknown Source)
at com.sun.javafx.application.LauncherImpl$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
Caused by: javafx.fxml.LoadException: java.lang.InstantiationException: java.net.URL
at javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(Unknown Source)
at javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source)
at javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at commerce.Commerce.start(Commerce.java:25)
at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
... 1 more
Caused by: java.lang.InstantiationException: java.net.URL
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:325)
... 15 more
Java Result: 1
I assume that the FXML is fine, because it works to preview it from SceneBuilder. Thanks
Sorry for my late reply.
The line with the error is URL line. It is generated by SceneBuilder.
PS: Also updating the JavaFX version to 2.2+ should fix this issue.