Skip to content
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

Make the error message to be more informative #724

Open
Artur- opened this issue Feb 25, 2021 · 1 comment
Open

Make the error message to be more informative #724

Artur- opened this issue Feb 25, 2021 · 1 comment

Comments

@Artur-
Copy link
Member

Artur- commented Feb 25, 2021

Describe the bug
If you configure a starter project from start.vaadin.com to produce a war and deploy it to Tomcat 8, you get

25-Feb-2021 10:16:32.356 INFO [localhost-startStop-3] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
25-Feb-2021 10:16:32.363 INFO [localhost-startStop-3] org.apache.catalina.core.ApplicationContext.log Initializing AtmosphereFramework
25-Feb-2021 10:16:32.698 SEVERE [localhost-startStop-3] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [com.vaadin.flow.server.startup.ServletContextListeners]
        java.lang.NullPointerException
                at com.vaadin.flow.server.startup.ApplicationConfiguration.lambda$get$0(ApplicationConfiguration.java:52)
                at com.vaadin.flow.server.startup.ApplicationConfiguration$$Lambda$14512/13359214.get(Unknown Source)
                at com.vaadin.flow.server.VaadinServletContext.getAttribute(VaadinServletContext.java:73)
                at com.vaadin.flow.server.startup.ApplicationConfiguration.get(ApplicationConfiguration.java:49)
                at com.vaadin.flow.server.DeploymentConfigurationFactory.createPropertyDeploymentConfiguration(DeploymentConfigurationFactory.java:82)
                at com.vaadin.flow.server.startup.ServletDeployer$StubServletConfig.createDeploymentConfiguration(ServletDeployer.java:184)
                at com.vaadin.flow.server.startup.ServletDeployer.lambda$getServletConfigurations$0(ServletDeployer.java:291)
                at com.vaadin.flow.server.startup.ServletDeployer$$Lambda$14511/25690887.accept(Unknown Source)
                at java.util.Optional.ifPresent(Optional.java:159)
                at com.vaadin.flow.server.startup.ServletDeployer.getServletConfigurations(ServletDeployer.java:290)
                at com.vaadin.flow.server.startup.ServletDeployer.contextInitialized(ServletDeployer.java:208)
                at com.vaadin.flow.server.startup.ServletContextListeners.contextInitialized(ServletContextListeners.java:42)
                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1841)
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at java.lang.Thread.run(Thread.java:745)

To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/Artur-/test-war-deployment.git
cd test-war-deployment
mvn clean install -Pproduction
cp target/*.war tomcat/webapps/

Expected behavior
The app is deployed.

Versions

  • Tomcat: 8.5.46 on Linux
  • Vaadin platform version: 19.0.0.beta4
@Artur-
Copy link
Member Author

Artur- commented Feb 25, 2021

Ok, this seems to be an issue when you build a project using Java 11 and deploy it to a server running with Java 8.

If you do this with Vaadin 18 or Vaadin 19 alpha 1, you see

10:39:57.426 [localhost-startStop-6] INFO com.vaadin.flow.server.startup.ServletDeployer - Skipping automatic servlet registration because there are no navigation targets registered to the route registry and there are no web component exporters.

which is not very informative either but at least not a stack trace indicating something is wrong in Vaadin.

Can we have a better error message?

@ZheSun88 ZheSun88 changed the title [BUG] Vaadin 19 Spring Boot projects cannot be deployed as war Make the error message to be more informative Feb 25, 2021
@ZheSun88 ZheSun88 transferred this issue from vaadin/platform Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants