org.springframework.context.ApplicationContextException

tip

You need to use the spring-boot-maven-plugin in the build section of your pom.xml.

tip

To create an executable jar we need to add the spring-boot-maven-plugin to our pom.xml

tip

Use 'application.sources' instead of returning a new Application in the SpringBootServletInitializer.configure function.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Webserver fails to start due to missing bean
    via Stack Overflow by Bula
    ,
    • org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)[NatLocApp.jar:na] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531)[NatLocApp.jar:na] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)[NatLocApp.jar:na] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)[NatLocApp.jar:na] at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347)[NatLocApp.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:295)[NatLocApp.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1112)[NatLocApp.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1101)[NatLocApp.jar:na] at com.nationallocums.Application.main(Application.java:13)[NatLocApp.jar:na] Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:183)[NatLocApp.jar:na] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:156)[NatLocApp.jar:na] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)[NatLocApp.jar:na] ... 8 more

    Users with the same issue

    MattyMatty
    1 times, last one,
    aldrinlealaldrinleal
    15 times, last one,
    stigkjstigkj
    2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    tomthomastomthomas
    18 times, last one,
    68 more bugmates