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 202615 - Html and jnlp files generated from FX project with fxml files fails to run
Summary: Html and jnlp files generated from FX project with fxml files fails to run
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Deployment (show other bugs)
Version: 7.1
Hardware: PC Windows 7 x64
: P1 normal (vote)
Assignee: Petr Somol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-24 20:56 UTC by Stepan Zebra
Modified: 2011-11-24 17:20 UTC (History)
2 users (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 Stepan Zebra 2011-09-24 20:56:00 UTC
Product Version: NetBeans IDE 7.1 Beta (Build 201109222201)
Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

Attempt to run html or jnlp from application using fxml files ends in runtime error with following message:
IX 24, 2011 10:35:42 ODP. javafx.fxml.FXMLLoader logException
SEVERE: The following error occurred at line 10 in file file:/C:/Users/stezeb/Documents/NetBeansProjects/JavaFXApplication2/dist/JavaFXApplication2.jar!/javafxapplication2/NewFXML.fxml[Ljava.lang.StackTraceElement;@7dcc2c70
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkMemberAccess(Unknown Source)
	at java.lang.Class.checkMemberAccess(Unknown Source)
	at java.lang.Class.getDeclaredMethods(Unknown Source)
	at javafx.fxml.FXMLLoader.getControllerMethods(Unknown Source)
	at javafx.fxml.FXMLLoader.access$900(Unknown Source)
	at javafx.fxml.FXMLLoader$Element.processEventHandlerAttributes(Unknown Source)
	at javafx.fxml.FXMLLoader$ValueElement.processEndElement(Unknown Source)
	at javafx.fxml.FXMLLoader.processEndElement(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 javafxapplication2.NewFXMLMain.start(NewFXMLMain.java:25)
	at com.sun.javafx.applet.FXApplet2$1.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)
	at java.lang.Thread.run(Unknown Source)

To reproduce:
Create FX project.
Add FXML Template into it.
Set the FXMLMain class as Application Class.
Build the project.
Go to dist directory.
Try to run html or jnlp file.

Note:
The FXML-Login sample application fails to run too, but doesn't show the stacktrace.

Please evaluate this issue for beta stopper status.
Comment 1 Petr Somol 2011-09-25 06:06:55 UTC
in daily (non-beta) build this is not reproducible.
Note that I tested this after the changes done by changeset

http://hg.netbeans.org/jet-main/rev/714e74976915

while the bugreport was based on build without the changeset.

Tried to create New FX FXML Application, followed by Run. This correctly build and run the FXML application. Tried the same with the FXML-Login sample and it works.

Note that the changeset also changed the behavior of New File -> FXML Template. After a request FXML SceneBuilder team we removed from the template the generation of main file.
Comment 2 Petr Somol 2011-09-25 06:34:24 UTC
714e74976915 transplanted to e8a442ddf09c in beta
Comment 3 Stepan Zebra 2011-09-25 06:37:00 UTC
(In reply to comment #1)
> in daily (non-beta) build this is not reproducible.
> Note that I tested this after the changes done by changeset
> 
> http://hg.netbeans.org/jet-main/rev/714e74976915
> 
> while the bugreport was based on build without the changeset.
> 
> Tried to create New FX FXML Application, followed by Run. This correctly build
> and run the FXML application. Tried the same with the FXML-Login sample and it
> works.
> 
> Note that the changeset also changed the behavior of New File -> FXML Template.
> After a request FXML SceneBuilder team we removed from the template the
> generation of main file.

Actually, I noticed this problem for the first time during verification of this fix in a build I made from trunk myself. Anton confirmed same problem on his machine.

Does this worksforyou even if you try the beta build? I think it's not related to this fix. If you won't get the error in beta, then it might be caused by my environment.

I will wait until today's daily build (will include this fix) is finished, and then re-check in that, to eliminate the possibility that it was caused by my environment.
Comment 4 Petr Somol 2011-09-25 17:58:39 UTC
works for me in beta by now.
Comment 5 Petr Somol 2011-09-25 19:20:05 UTC
More specific description of current functionality:
Applications created as New FXML Application using New Project wizard
run correctly in all three deployment modes (standalone, webstart, embedded in html) if signing is on. If signing is off, then the application runs correctly standalone, but an attempt to run it as WebStart does nothing and run In Browser reports an error in the application's area within the html.
Comment 6 Stepan Zebra 2011-09-25 19:55:32 UTC
(In reply to comment #5)
> More specific description of current functionality:
> Applications created as New FXML Application using New Project wizard
> run correctly in all three deployment modes (standalone, webstart, embedded in
> html) if signing is on. If signing is off, then the application runs correctly
> standalone, but an attempt to run it as WebStart does nothing and run In
> Browser reports an error in the application's area within the html.

Verified. The application works after signing.
Comment 7 Petr Somol 2011-11-24 17:20:21 UTC
This is already integrated since September and does not need any further action. Changing Target milestone back to 7.1.