-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to launch Spring boot application #156
Comments
Well i had little chance to play again today, i tried to use headless launcher, and i did found this, however no luck.headless launcher would throw same mistake. |
Well, i think i found a bug, and it is bit weird one.
Above there are 2 execution settings, one to setup custom UI , and the other that sets the headless launcher. When i comment setting of the custom UI out the application works, but when i want to setup custom ui, the application fails : Here is the stack trace when custom ui option is enabled :
I hope anyone else can test just to confirm this, i did try with two different spring boot projects (both were just basic hello world stuff) but its the same. if i include headless launcher settings and comment out custom UI one, it works, but if i dont comment out custom UI execution settings it crashes. |
@zeljkosh, an alternative is change the class Launcher.java to call HeadlessMainLauncher.main(args) when appClass ins't subclass of javafx.application.Application! Doing it I could load CustomUI and Spring Boot 2.0 together.
|
@wcrozeta hope you see that "app = appClass.newInstance();" Also, my class isn't covering the method "createApplication(Class appClass)". Which class should I extend in order to override this method? Also, I can't call Launcher.args (since args is not located in Launcher class from fxlauncher dependency) |
I did try the launcher on several normal javafx applications and it works really nice, however when i did try to do it with spring boot it fails , giving me log file with just some "launcher" error and then i got stuck. I did however see that since version .18 spring boot is supported, so perhaps i am doing something wrong.
https://github.com/zeljkosh/demo
There is a link of my repo with just demo code, but you can check pom file if i am making any error.
Apr 09, 2019 12:10:52 PM fxlauncher.AbstractLauncher syncFiles INFO: Using cache dir C:\Users\ITsZeus\AppData\Local\Demo Apr 09, 2019 12:10:52 PM fxlauncher.AbstractLauncher createApplicationEnvironment INFO: Loading appClass com.example.demo.DemoApplication
that is above info from log file.
launcher it self throws two errors :
java.lang.NoClassDefFoundError: org/springframework/context/ConfigurableApplicationContext at com.example.demo.DemoApplication.start(DemoApplication.java:33) at fxlauncher.Launcher.startApplication(Launcher.java:242) at fxlauncher.Launcher.lambda$launchAppFromManifest$2(Launcher.java:194) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._enterNestedEventLoopImpl(Native Method) at com.sun.glass.ui.win.WinApplication._enterNestedEventLoop(WinApplication.java:204) at com.sun.glass.ui.Application.enterNestedEventLoop(Application.java:511) at com.sun.glass.ui.EventLoop.enter(EventLoop.java:107) at com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(QuantumToolkit.java:590) at javafx.stage.Stage.showAndWait(Stage.java:474) at javafx.scene.control.HeavyweightDialog.showAndWait(HeavyweightDialog.java:162) at javafx.scene.control.Dialog.showAndWait(Dialog.java:341) at fxlauncher.Launcher$1.lambda$reportError$2(Launcher.java:84) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.springframework.context.ConfigurableApplicationContext at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 24 more
I hope someone can help me, thank you. if you need anything else let me know
The text was updated successfully, but these errors were encountered: