Jump to content
Excelsior Forums
rwhite226

Error with kotlin and tornadofx

Recommended Posts

I'm trying to use kotlin with tornadofx (a kotlin javafx wrapper.) I keep getting errors similar to this one.


Exception in Application constructor
Exception in thread "main" java.lang.RuntimeException: Unable to construct Application instance: class TodoTestApp
	at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
	at com.sun.javafx.application.LauncherImpl.<unknown>(Unknown Source)
	at com.sun.javafx.application.LauncherImpl$$Lambda$37.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.<unknown>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.sun.javafx.application.LauncherImpl.<unknown>(Unknown Source)
	at com.sun.javafx.application.LauncherImpl$$Lambda$231.run(Unknown Source)
	at com.sun.javafx.application.PlatformImpl.<unknown>(Unknown Source)
	at com.sun.javafx.application.PlatformImpl$$Lambda$74.run(Unknown Source)
	at com.sun.javafx.application.PlatformImpl.<unknown>(Unknown Source)
	at com.sun.javafx.application.PlatformImpl$$Lambda$216.run(Unknown Source)
	at java.security.AccessController.<unknown>(Unknown Source)
	at com.sun.javafx.application.PlatformImpl.<unknown>(Unknown Source)
	at com.sun.javafx.application.PlatformImpl$$Lambda$62.run(Unknown Source)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.<unknown>(Unknown Source)
	at com.sun.glass.ui.win.WinApplication$$Lambda$108.run(Unknown Source)
	... 1 more
Caused by: java.lang.VerifyError: class: "tornadofx/CSSKt", method: "toSelector", signature: "(Ljava/lang/String;)Ltornadofx/CssSelector;", offset 123
Uninitialized object exists on backward branch 77
	at tornadofx.Stylesheet.<clinit>(Unknown Source)
	at tornadofx.App.<init>(Unknown Source)
	at tornadofx.WorkspaceApp.<init>(Unknown Source)
	at TodoTestApp.<init>(Unknown Source)
	... 18 more

Here is a link to a demo app that exhibits the issue https://github.com/rwhite226/tornadofx-bug-demo

Share this post


Link to post
Share on other sites

Thank you for the sample. We have reproduced the problem and can confirm that it is a bug in our verifier.
We will fix it in the next Excelsior JET release (i.e. version 14).

Could you please contact us by email (java (at) excelsior-usa.com)? We can make a hotfix for the current version or suggest a workaround.

P.S. gradlew.bat is useless without gradle/wrapper/gradle-wrapper.jar. It is a good idea to add the following lines to your gitignore:

!gradle/wrapper/gradle-wrapper.jar
Edited by cypok
Fix formatting

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×