您的位置:首页 > 运维架构 > Apache

十二月 19, 2017 8:45:03 上午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending

2017-12-19 08:49 531 查看
十二月 19, 2017 8:45:03 上午 org.apache.catalina.core.StandardContext listenerStart

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pmSaleSiteServiceImpl': Unsatisfied dependency expressed through field 'pmSaleSiteMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No qualifying bean of type 'com.sgai.cps.pm.mapper.PmSaleSiteMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)

 at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)

 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)

 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)

 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)

 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)

 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)

 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)

 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4751)

 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5175)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

 at java.util.concurrent.FutureTask.run(FutureTask.java:266)

 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

 at java.lang.Thread.run(Thread.java:748)

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.sgai.cps.pm.mapper.PmSaleSiteMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1486)

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)

 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)

 ... 24 more

一般出现上图类似代码的朋友们,你们可以检查一下报错中所对应的注解是否正确,是否有某个@没有写,最常见的就是@Service,@Autowired,@Override,容易被忽略.可以试试.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Caused by org.spring
相关文章推荐