Jan 23, 2018 8:36:38 PM com.vaadin.server.DefaultErrorHandler doDefault
SEVERE:
java.lang.IllegalStateException: Spring WebApplicationContext not initialized for UI provider. Use e.g. ContextLoaderListener to initialize it.
at com.vaadin.spring.server.SpringUIProvider.(SpringUIProvider.java:80)
at com.vaadin.spring.server.SpringVaadinServlet$1.sessionInit(SpringVaadinServlet.java:101)
at com.vaadin.server.VaadinService.onVaadinSessionStarted(VaadinService.java:864)
at com.vaadin.server.VaadinService.createAndRegisterSession(VaadinService.java:822)
at com.vaadin.server.VaadinService.doFindOrCreateVaadinSession(VaadinService.java:774)
at com.vaadin.server.VaadinService.findOrCreateVaadinSession(VaadinService.java:714)
Must say tnis is very hard to get a simple project deployed. Eclipse is fine seems to work but when it comes to getting it out not great. Must be a simpler way.
yes correct so I did try that but if you do that it will use spring-boot. The only issue with that is spring-boot does not seem to accept the java classpath. So say when you build your war and deploy it and you have a file called. myfunnydata.dat you can’t ready it because it gives classpath errors.
Using Spring Initializr makes starting a new project very easy, even with vaadin.
Just to better understand, your project is running inside eclipse but not when deployed on an external application server?
Sorry,
I misunderstood your deployment configuration.
When I need external classpath for a spring boot executable jar I use the “-Dloader.path” property, and also configure spring-boot-maven-plugin with layout=zip configuration.
I don’t know gradle very well.
With maven I think you could skip repackage goal of spring-boot plugin and then use assembly plugin to package the as you want (eg as a zip with lib dir with all dependencies, conf dir, …)
$ ls -la …/…/src/main/profiles/
total 8
drwxr-xr-x 3 user staff 102 10 Jan 18:45 .
drwxr-xr-x@ 7 user staff 238 27 Dec 13:17 …
-rw-r–r-- 1 user staff 1266 15 Jan 09:55 default-config.xml
$
java.lang.RuntimeException: An error occurred reading the default-config.xml config file: class path resource [default-config.xml]
cannot be opened because it does not exist
…
…
…Caused by: java.io.FileNotFoundException: class path resource [default-config.xml]
cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172) ~[spring-core-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
…
…
…Caused by: java.io.FileNotFoundException: class path resource [default-config.xml]
cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172) ~[spring-core-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
nested exception is java.lang.NoSuchMethodError: com.vaadin.ui.Grid.addComponentColumn(Lcom/vaadin/data/ValueProvider;)Lcom/vaadin/ui/Grid$Column;] with root cause
That makes me thing there is a transitive under this that is causing a conflict.
Sure let me package it up. Really this is not an easy process maybe gradle but should be simple. Spring boot I think causes more issues than it is worth. Let me package up a build.gradle.