Hello Felix,
at first: thanks for sharing your implementation of spring boot into javafx as library.
Problem
While starting the application I see the splashscreen and that's it. There's no console output of spring booting.
1. Problem Application does not start
2. Problem There seems to be no console output
e.g. the spring logo:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.0.BUILD-SNAPSHOT)
What I already did
Debugging
Debugging showed that execution stops at booting spring context: here
Checking for Exceptions
After debugging my first guess were SpringApplication.run();
is throwing exceptions I can't see on my console output for whatever reason. So I copied your AbstractJavaFxApplicationSupport
class and let my Main class extend from this copy. Aaaand we have an output with exception now:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.0.BUILD-SNAPSHOT)
2017-06-09 13:33:19.838 INFO o.s.boot.SpringApplication - Starting application on DEINEMUDDAH with PID 6768 (started by deinemuddah in D:\Projekte\java\wovdb)
2017-06-09 13:33:19.839 INFO o.s.boot.SpringApplication - No active profile set, falling back to default profiles: default
2017-06-09 13:33:19.868 INFO o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2e99e190: startup date [Fri Jun 09 13:33:19 CEST 2017]; root of context hierarchy
2017-06-09 13:33:20.415 INFO o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-06-09 13:33:20.837 INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'default'
2017-06-09 13:33:21.626 INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default'
2017-06-09 13:33:22.327 INFO o.s.boot.SpringApplication - Started application in 2.857 seconds (JVM running for 4.585)
Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: Location is not set.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2434)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at de.felixroske.jfxsupport.AbstractFxmlView.loadSynchronously(AbstractFxmlView.java:173)
at de.felixroske.jfxsupport.AbstractFxmlView.ensureFxmlLoaderInitialized(AbstractFxmlView.java:190)
at de.felixroske.jfxsupport.AbstractFxmlView.getView(AbstractFxmlView.java:202)
at de.argon.wovdb.AbstractSpringJavaFxApp.showView(AbstractSpringJavaFxApp.java:149)
at de.argon.wovdb.AbstractSpringJavaFxApp.showInitialView(AbstractSpringJavaFxApp.java:125)
at de.argon.wovdb.AbstractSpringJavaFxApp.lambda$start$2(AbstractSpringJavaFxApp.java:93)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(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$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
I'm not sure if this exception is also thrown when using the original AbstractJavaFxApplicationSupport class.
Location is not set == View class can not find fxml?
After I set the location to my fxml file into the view class:
@FXMLView(
value="/fxml/helloworld/helloworld.fxml"
)
I got an running Helloworld app with my copied AbstractJavaFxApplicationSupport class.
Switching back to the original AbstractJavaFxApplicationSupport class from your lib. I got the same problem again. I see the Splashscreen and no console ouput.
Meta Info
- de.roskenet:springboot-javafx-support:1.3.22
- Spring Boot version 2.0.0-SNAPSHOT