• BeanDefinitionStoreException


    1. 异常摘要
    2. org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML   
    3. document from class path resource [com/herman/ss/controller]; nested exception is java.io.FileNotFoundException:  
    4.  class path resource [com/herman/ss/controller] cannot be opened because it does not exist  

    解决办法:没有找配置文件为controller的xml,修改一下配置文件名字即可。

     
      1. <init-param>  
      2.     <param-name>contextConfigLocation</param-name>  
      3.     <param-value>classpath:com/herman/ss/config/testAjax.xml</param-value>  
      4. </init-param>  

    异常详情:

    十二月 21, 2016 8:55:12 下午 org.apache.catalina.core.ApplicationContext log
    严重: StandardWrapper.Throwable
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private demo.service.CityService demo.controller.DemoController.cityService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [demo.service.CityService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

    Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private demo.service.CityService demo.controller.DemoController.cityService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [demo.service.CityService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 29 more
    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [demo.service.CityService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)

  • 相关阅读:
    C# webBrowser禁止在新窗口打开,强制在本窗口打开
    C# StatusStrip状态栏 例程
    iphone实现弹出框视图
    在iOS开发中使用FMDB
    XCode 4.2 新功能 Storyboard
    FMDB一个sqlite的封装
    Xcode 4的新特性
    sqlite加密SQLCipher
    跨iPhone应用程序的方便,模块化的代码共享:静态库和跨项目的引用
    Navicat for SQLite For Ma OS X
  • 原文地址:https://www.cnblogs.com/21heshang/p/6209178.html
Copyright © 2020-2023  润新知