org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginDao' defined in file [D:\apache-tomcat-7.0.16\webapps\cpfb\WEB-INF\classes\com\ryb\dao\impl\LoginDaoImpl.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean name 'txAdvice' in bean reference for bean property 'adviceBeanName'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:446)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:289)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:286)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:188)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:543)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:730)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:387)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:270)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginDao' defined in file [D:\apache-tomcat-7.0.16\webapps\cpfb\WEB-INF\classes\com\ryb\dao\impl\LoginDaoImpl.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean name 'txAdvice' in bean reference for bean property 'adviceBeanName'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:446)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:289)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:286)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:188)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:543)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:730)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:387)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:270)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLo

解决方案 »

  1.   

    D:\apache-tomcat-7.0.16\webapps\cpfb\WEB-INF\classes\com\ryb\dao\imp中定义的名为loginDao的bean无法创建
      

  2.   

    学会看错误哈 Invalid bean name 'txAdvice' in bean reference for bean property 'adviceBeanName'
      

  3.   

    配置loginDao时候错误了,通过报错,lz应该用的annotation吧。好好检查一下,看什么地方有纰漏了。
      

  4.   

    配置loginDao时候错误了,通过报错,lz应该用的annotation吧。好好检查一下,看什么地方有纰漏了