Skip to content

Make the error message to be more informative  #724

@Artur-

Description

@Artur-

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions