org.springframework.context.ApplicationContextException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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.

  • GitHub comment 265#243560605
    via GitHub by avvarus
    ,
  • Unable to autowire repo bean
    via Stack Overflow by Em Ae
    ,
    • org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulProxyConfiguration': Unsatisfied dependency expressed through field 'clientFactory': No qualifying bean of type [org.springframework.cloud.netflix.ribbon.SpringClientFactory] found for dependency [org.springframework.cloud.netflix.ribbon.SpringClientFactory]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.cloud.netflix.ribbon.SpringClientFactory] found for dependency [org.springframework.cloud.netflix.ribbon.SpringClientFactory]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:150)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:130)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE] at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:613)[com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)[com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)[com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)[com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)[com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)[com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)[com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)[com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1379)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2189)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:446)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:389)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:117)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:664)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5384)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5600)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:678)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:622)[com.ibm.ws.runtime.jar:na] at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1269)[com.ibm.ws.runtime.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.7.0] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)[na:1.7.0] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)[na:1.7.0] at java.lang.reflect.Method.invoke(Method.java:620)[na:2.6 (06-30-2016)] at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:88)[na:1.7.0] at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)[na:1.7.0] at java.lang.reflect.Method.invoke(Method.java:620)[na:2.6 (06-30-2016)] at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:292)[na:1.7.0] at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1261)[na:1.7.0] at java.security.AccessController.doPrivileged(AccessController.java:422)[na:1.7.0] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:88)[na:1.7.0] at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1255)[na:1.7.0] at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1093)[na:1.7.0] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:832)[na:1.7.0] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:814)[na:1.7.0] at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)[com.ibm.ws.admin.core.jar:na]

    Users with the same issue

    Adarro
    1 times, last one,
    Matty
    1 times, last one,
    aldrinleal
    15 times, last one,
    stigkj
    2 times, last one,
    Unknown visitor1 times, last one,
    68 more bugmates