Skip to content

Not able to startup webapp inside of Tomcat #221

@csavory

Description

@csavory

I can start my app (as a jar) from the command line, but as soon as I try to start from Tomcat (as a war) I get a a startup error.

SpringServletContainerInitializer will loop through all the WebApplicationInitializer that it finds:

        for (WebApplicationInitializer initializer : initializers) {
            initializer.onStartup(servletContext);
        }

SpringBootServletInitializer is found and and its onStartup is called.

SpringBootServletInitializer will create a new SpringApplicationBuilder on line 81:

SpringApplicationBuilder application = new SpringApplicationBuilder();

this is not passing any sources into the constructor.

Then on line 328 of SpringApplication there is an Assert that fails.

Assert.notEmpty(sources, "Sources must not be empty");

Am I configuring this wrong? I have tried several versions and even dropping back to 0.5.0.M7 and M6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions