org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat

GitHub | dearnani | 2 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug tip
    Change the connection port and ip adress. If you're trying to connect to your server from your own computer, check if you haven't already connected to the server in another instance.
  2. 0
    samebug tip
    You could be missing na annotation (@Service or @Component) or the <bean> definition in the xml. Also, look if the class where your implementation is located is properly scanned (check "<context:component-scan base-package=")
    via goo.gl
  3. 0

    How can I move the main method that sets up Spring Boot into the base package without breaking it

    Stack Overflow | 10 months ago | Dale
    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.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring boot error :Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

    Stack Overflow | 1 year ago | Aman
    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.
  6. 0

    spring-boot-starter-jetty 1.4.x.RELEASE missing EmbeddedServletContainerFactory

    Stack Overflow | 6 months ago | ndtreviv
    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.

  1. kjhdofjosvs 3 times, last 6 months ago
  2. Andreas Häber 1 times, last 2 months ago
  3. treefolk 1 times, last 4 months ago
  4. Tahir 6 times, last 7 months ago
  5. asdasd 4 times, last 7 months ago
14 more registered users
81 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.setFilterChainProxySecurityConfigurer(org.springframework.security.config.annotation.ObjectPostProcessor,java.util.List) throws java.lang.Exception; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.security.core.userdetails.UserDetailsService org.yatin.rajani.config.SecurityConfiguration.userDetailsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.yatin.rajani.repository.UserRepository org.yatin.rajani.security.UserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Cannot create inner bean '(inner bean)#76712d67' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#76712d67': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/yatin/rajani/config/DatabaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.ValidationFailedException: Validation Failed: 1 change sets check sum classpath:config/liquibase/changelog/00000000000000_initial_schema.xml::00000000000001::jhipster is now: 7:979cdc38a000f73875133577857ab6e9 ```

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues()
  2. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    9. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    10. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    11. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    12. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    13. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    14. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    15. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    16. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    17. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    17 frames
  3. Spring Boot
    TomcatStarter.onStartup
    1. org.springframework.boot.context.embedded.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:209)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    2. org.springframework.boot.context.embedded.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:165)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    3. org.springframework.boot.context.embedded.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:160)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    4. org.springframework.boot.context.embedded.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:143)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    5. org.springframework.boot.context.embedded.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:74)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    6. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:234)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    7. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:221)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    8. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:84)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    9. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:206)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    10. org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:54)[spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
    10 frames
  4. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5151)[tomcat-embed-core-8.0.20.jar:8.0.20]
    2. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[tomcat-embed-core-8.0.20.jar:8.0.20]
    3. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)[tomcat-embed-core-8.0.20.jar:8.0.20]
    4. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)[tomcat-embed-core-8.0.20.jar:8.0.20]
    4 frames
  5. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_25]
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_25]
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_25]
    4. java.lang.Thread.run(Thread.java:745)[na:1.8.0_25]
    4 frames