ssh框架在启动tomcat时报org.springframework.beans.factory.BeanCreationException

原创 2015年11月19日 11:52:08
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseService' defined in ServletContext resource [/WEB-INF/classes/com/CourseProject/spring/config/spring_service.xml]: Cannot resolve reference to bean 'baseDao' while setting bean property 'baseDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'baseDao' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'baseDao' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

... 28 more


当遇到org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'baseDao' is defined 问题后这个问题不要着急,仔细检查你自己的配置文件文件名是否写的正确,还有spring开发时一定要注意大小写!!!

版权声明:本文为博主原创文章,未经博主允许不得转载。

Tomcat启动异常org.springframework.beans.factory.BeanCreationException

org.springframework.beans.factory.BeanCreationException异常代码块严重: Exception sending context initialize...

关于maven项目tomcat启动异常org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 解决

错误代码情况: 严重: Exception starting filter shiroFilter org.springframework.beans.factory.NoSuchBeanDefin...
  • lustres
  • lustres
  • 2017年05月03日 15:27
  • 5755

SpringMVC + Mybatis + Shiro + ehcache时缓存管理器报错。

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter'...

SSH整合时Tomcat启动报错:org.springframework.beans.factory.BeanCreationException: Error creating bean with n

九月 04, 2014 10:16:49 上午 org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based A...

搭建SSH框架解决的小问题org.springframework.beans.factory.BeanCreationException

在以前搭建的一个SSH框架Demo在今天运行时报了如下错误信息: 严重: Exception sending context initialized event to listener instan...

tomcat启动异常--org.springframework.beans.factory.BeanCreationException

异常org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginContr...

ssh搭建 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessio

转载问题解决办法

初次整合SSH时,遇到了org.springframework.beans.factory.BeanCreationException错误

初次整合SSH时,遇到了org.springframework.beans.factory.BeanCreationException错误,在网上找了很久,一般都说jar包冲突,或者路径错误,但都不能...
  • xf_fox
  • xf_fox
  • 2017年05月30日 22:03
  • 4941

org.springframework.beans.factory.BeanCreationException

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

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userAction'

在SSH中一个常见的Action创建异常,当启动Tomcat时:严重: Exception sending context initialized event to listener instance...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:ssh框架在启动tomcat时报org.springframework.beans.factory.BeanCreationException
举报原因:
原因补充:

(最多只允许输入30个字)