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

Stack Overflow | mayooran | 2 months 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

    springboot 1.4升级中遇到的奇葩问题 - 易极客

    com.cn | 7 months ago
    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 1.4.0 never starts successfully

    Stack Overflow | 7 months ago | Badal Baidya
    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.
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. java.io.FileNotFoundException

    /home/mayooran/Projects/bus-route-challenge/target/bus-route-service-0.0.1-SNAPSHOT-exec.jar!/BOOT-INF/classes (No such file or directory)

    at java.io.FileInputStream.open0()
  2. Java RT
    URL.openStream
    1. java.io.FileInputStream.open0(Native Method)[na:1.8.0_111]
    2. java.io.FileInputStream.open(FileInputStream.java:195)[na:1.8.0_111]
    3. java.io.FileInputStream.<init>(FileInputStream.java:138)[na:1.8.0_111]
    4. java.io.FileInputStream.<init>(FileInputStream.java:93)[na:1.8.0_111]
    5. sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)[na:1.8.0_111]
    6. sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)[na:1.8.0_111]
    7. java.net.URL.openStream(URL.java:1045)[na:1.8.0_111]
    7 frames
  3. jersey-core-server
    ResourceConfig.packages
    1. org.glassfish.jersey.server.internal.scanning.JarZipSchemeResourceFinderFactory.getInputStream(JarZipSchemeResourceFinderFactory.java:177)[jersey-server-2.25.1.jar!/:na]
    2. org.glassfish.jersey.server.internal.scanning.JarZipSchemeResourceFinderFactory.create(JarZipSchemeResourceFinderFactory.java:87)[jersey-server-2.25.1.jar!/:na]
    3. org.glassfish.jersey.server.internal.scanning.JarZipSchemeResourceFinderFactory.create(JarZipSchemeResourceFinderFactory.java:65)[jersey-server-2.25.1.jar!/:na]
    4. org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.addResourceFinder(PackageNamesScanner.java:282)[jersey-server-2.25.1.jar!/:na]
    5. org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.init(PackageNamesScanner.java:198)[jersey-server-2.25.1.jar!/:na]
    6. org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.<init>(PackageNamesScanner.java:154)[jersey-server-2.25.1.jar!/:na]
    7. org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.<init>(PackageNamesScanner.java:110)[jersey-server-2.25.1.jar!/:na]
    8. org.glassfish.jersey.server.ResourceConfig.packages(ResourceConfig.java:680)[jersey-server-2.25.1.jar!/:na]
    9. org.glassfish.jersey.server.ResourceConfig.packages(ResourceConfig.java:660)[jersey-server-2.25.1.jar!/:na]
    9 frames
  4. com.testservice.challenge
    ApplicationConfig$JerseyConfig.<init>
    1. com.testservice.challenge.ApplicationConfig$JerseyConfig.<init>(ApplicationConfig.java:24)[classes!/:0.0.1-SNAPSHOT]
    1 frame
  5. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[na:1.8.0_111]
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[na:1.8.0_111]
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_111]
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:423)[na:1.8.0_111]
    4 frames
  6. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    2. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    11. org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    12. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    13. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    14. org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    15. org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    16. org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    17. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    18. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    19. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    20. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    21. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    22. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    23. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    24. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    25. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    26. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    27. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    28. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    29. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    30. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    31. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    32. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    33. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
    33 frames
  7. org.springframework.boot
    ServletContextInitializerBeans.<init>
    1. org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:234)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    2. org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:215)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    3. org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:91)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    4. org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:79)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    4 frames
  8. Spring Boot
    TomcatStarter.onStartup
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:241)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    2. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:228)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    3. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    4. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    5. org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:55)[spring-boot-1.5.1.RELEASE.jar!/:1.5.1.RELEASE]
    5 frames
  9. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5178)[tomcat-embed-core-8.5.11.jar!/:8.5.11]
    2. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[tomcat-embed-core-8.5.11.jar!/:8.5.11]
    3. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)[tomcat-embed-core-8.5.11.jar!/:8.5.11]
    4. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)[tomcat-embed-core-8.5.11.jar!/:8.5.11]
    4 frames
  10. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_111]
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_111]
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_111]
    4. java.lang.Thread.run(Thread.java:745)[na:1.8.0_111]
    4 frames