Exception at startup / CSSFXTab / Java 9
Original report by Dirk Lemmermann (Bitbucket: dlemmermann, GitHub: dlemmermann).
When trying to run ScenicView with Java 9 I am always getting this exception. I am calling ScenicView.show(parent) from within my app.
java.lang.IllegalStateException: Location is not set.
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459)
at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435)
at [email protected]/org.scenicview.view.tabs.CSSFXTab.createTabContent(CSSFXTab.java:62)
at [email protected]/org.scenicview.view.tabs.CSSFXTab.(CSSFXTab.java:54)
at [email protected]/org.scenicview.view.ScenicViewGui.buildUI(ScenicViewGui.java:300)
at [email protected]/org.scenicview.view.ScenicViewGui.(ScenicViewGui.java:214)
at [email protected]/org.scenicview.ScenicView.show(ScenicView.java:105)
at [email protected]/org.scenicview.ScenicView.show(ScenicView.java:78)
at crm.desktop.ui/uk.co.senapt.desktop.ui.CrmDesktopUI.loginSuccessful(CrmDesktopUI.java:203)
at crm.desktop.ui.shell/uk.co.senapt.desktop.shell.skins.LoginViewSkin.lambda$new$1(LoginViewSkin.java:45)
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.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)
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.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.graphics/javafx.scene.Node.fireEvent(Node.java:8863)
at javafx.controls/javafx.scene.control.Button.fire(Button.java:200)
at javafx.controls/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:206)
at javafx.controls/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
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)
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.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3876)
at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1300(Scene.java:3604)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1874)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2613)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556)
at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942)
at javafx.graphics/com.sun.glass.ui.mac.MacView.notifyMouse(MacView.java:127)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at [email protected]/org.scenicview.view.tabs.CSSFXTab.setActiveStage(CSSFXTab.java:112)
at [email protected]/org.scenicview.view.ScenicViewGui.setActiveStage(ScenicViewGui.java:736)
at [email protected]/org.scenicview.model.update.AppsRepository.lambda$appAdded$3(AppsRepository.java:97)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
Original comment by Jonathan Giles (Bitbucket: JonathanGiles, GitHub: JonathanGiles).
I just merged that PR, thanks!
Original comment by François Martin (Bitbucket: martinfrancois, GitHub: martinfrancois).
@JPereda I just submitted a fix for this in PR #16
Original comment by Jose Pereda (Bitbucket: JPereda, GitHub: JPereda).
Thanks @dschlenz for your patch.
It would be great if you could create a PR with your fix?
Original comment by Dagmar Schlenz (Bitbucket: dschlenz, GitHub: Unknown).
Just found the Attach-Button :-)
Original comment by Dagmar Schlenz (Bitbucket: dschlenz, GitHub: Unknown).
I am launching ScenicView with the following command:
java -Djdk.attach.allowAttachSelf=true -jar C:\project\tools\ScenicView\Java9\scenicviewpatch.jar
Sure I can make available the patched jar - but where and how?
Original comment by Tobias Oelgarte (Bitbucket: niabot, GitHub: niabot).
I tried to copy the "cssfxtabcontent.fxml" to "org.scenicview.view.cssfx" by modifying the downloaded jar archive. But it didn't change anything for me. Still only a bunch of exceptions and still not working.
Original comment by Dirk Lemmermann (Bitbucket: dlemmermann, GitHub: dlemmermann).
Could you make this JAR available please?
Original comment by Dagmar Schlenz (Bitbucket: dschlenz, GitHub: Unknown).
This exception also appears when starting ScenicView as a java agent or standalone.
It seems that this Exception is the cause that it is not possible to see the SceneGraph
of a JavaFX Application at all with jdk 9.0.1 and ScenicView 9.0.0.
I created an own patch Version of scenicview.jar which contains the missing cssfxtabcontent.fxml in package
org.scenicview.view.cssfx and with that version ScenicView is working as expected.
Fixed in 8ecb422445c1aa580746e2bcc76152147bcc9dca, but a new release is needed for Java 9, so most people can profit from this fix. See #40.