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.

Samebug tips3

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

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

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web776

  • Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
  • Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
  • Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
  • Stack trace

    • 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)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:760)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:360)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at com.nggantt.NgganttApplication.main(NgganttApplication.java:13)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.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:185)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:158)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)[APP-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] ... 8 more

    Write tip

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

    Users with the same issue

    Once, 1 month ago
    15 times, 2 months ago
    2 times, 3 months ago
    Unknown user
    Once, 3 months ago
    18 times, 5 months ago
    68 more bugmates