Caused by: org.springframework.beans.factory.BeanCreationException

时间:2021-09-08 20:27:55

1、错误原因

2014-7-13 17:36:57 org.apache.jasper.compiler.TldLocationsCache tldScanJar
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2014-7-13 17:36:59 org.apache.struts2.dispatcher.Dispatcher error
严重: Exception occurred during processing request: Unable to instantiate Action, com.you.user.action.StudentAction, defined for 'findStudent' in namespace '/action/student'Error creating bean with name 'com.you.user.action.StudentAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'studentService' is defined
Unable to instantiate Action, com.you.user.action.StudentAction, defined for 'findStudent' in namespace '/action/student'Error creating bean with name 'com.you.user.action.StudentAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'studentService' is defined
at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:316)
at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:397)
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:194)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:552)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.you.user.action.StudentAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'studentService' is defined
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:307)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1139)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:384)
at com.opensymphony.xwork2.spring.SpringObjectFactory.autoWireBean(SpringObjectFactory.java:203)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:183)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:154)
at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:171)
at com.opensymphony.xwork2.factory.DefaultActionFactory.buildAction(DefaultActionFactory.java:22)
at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:297)
... 25 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'studentService' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:603)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1149)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:443)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:417)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:551)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:304)
... 34 more

2、错误原因

    因为配置applicationContext.xml时,未将其配置到web.xml中



3、解决的方法

    在web.xml中加入一段xml代码:

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:applicationContext*.xml,
classpath*:applicationContext.xml
</param-value>
</context-param>





Caused by: org.springframework.beans.factory.BeanCreationException的更多相关文章

  1. Caused by&colon; org&period;springframework&period;beans&period;factory&period;BeanCreationException&colon; Could not autowire field

    1 错误描述 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.s ...

  2. Caused by&colon; org&period;springframework&period;beans&period;factory&period;BeanCreationException&colon; Could not autowire field&colon; private com&period;&ast;&ast;&ast;&ast;&ast;&ast;&period;seashell&period;bpc&period;query&period;query&period;service&period;FscBankPayCodeQueryService

    2019-03-19 16:22:14,945 WARN [main] (org.springframework.context.support.AbstractApplicationContext. ...

  3. Caused by&colon; org&period;springframework&period;beans&period;factory&period;BeanCreationException&colon; Error creating bean with name &&num;39&semi;fundService&&num;39&semi;&colon; Injection of resource dependencies failed&semi;

    在进行SSM的Controller的编写, 从浏览器访问后端Controller的时候遇到了这个问题. 这个问题的描述: 创建Bean的对象失败 错误代码如下: @Service("fund ...

  4. Caused by&colon; org&period;springframework&period;beans&period;factory&period;BeanCreationException&colon; Error creating bean with name &&num;39&semi;sqlSessionFactory&&num;39&semi; defined in class path resource &lbrack;spring-mybatis&period;xml&rsqb;&colon; Initialization of bean failed

  5. 【解决方案】 org&period;springframework&period;beans&period;factory&period;BeanCreationException&colon; Error creating bean with name &&num;39&semi;userHandler&&num;39&semi;&colon; Injection of resource dependencies failed&semi;

    一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...

  6. Caused by&colon; org&period;springframework&period;beans&period;factory&period;NoSuchBeanDefinitionException

    1.错误描写叙述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -he ...

  7. org&period;springframework&period;beans&period;factory&period;BeanCreationException&colon; Error creating bean with name &&num;39&semi;redisConnectionFactory&&num;39&semi; defined in class path resource

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'r ...

  8. org&period;springframework&period;beans&period;factory&period;BeanCreationException&colon; Error creating bean with name &&num;39&semi;catchFromPBomService&&num;39&semi;&colon; Cannot create inner bean &&num;39&semi;&lpar;inner bean&rpar;&num;302efb82&&num;39&semi; of type &lbrack;com&period;thinkgem&period;jeesite&period;modules&period;fd

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

  9. ssh整合报错严重&colon; Context initialization failed org&period;springframework&period;beans&period;factory&period;BeanCreationException&colon; Error creating bean with name &&num;39&semi;xxx&&num;39&semi;

    错误描述:eclipse整合ssh的时候 报不能创建名字为xxx的对象 信息: Destroying singletons in org.springframework.beans.factory.s ...

随机推荐

  1. 深入浅出SQL笔记1–数据和表

    1.数据库的概念及组成 数据库是保存表和其他相关SQL结构的容器. 数据库是由各种各样的表构成的,一个数据库里面的表总是存在相互联系的关系. 数据库内的信息组成了表,表示由行和列构成的,行是一组能够描 ...

  2. Android菜鸟成长记7 -- Android的五大布局

    Android五大布局,相信android的都了解过,今天我根据自己的学习整理一下五大布局,主要介绍的是线性布局(LiearLayout),因为,其他的布局使用率不是很高. Android的五大布局 ...

  3. 将List&lt&semi;T&gt&semi;转化成 DataTable--调整可空类型的转化错误

    加载表结构并保持成XML string cmdText = @"select * from kb_lable_temp where 1=2"; using (SqlConnecti ...

  4. 微信、QQ这类IM App怎么做——谈谈Websocket

    前言 关于我和WebSocket的缘:我从大二在计算机网络课上听老师讲过之后,第一次使用就到了毕业之后的第一份工作.直到最近换了工作,到了一家是含有IM社交聊天功能的app的时候,我觉得我现在可以谈谈 ...

  5. C# Base64编码&sol;解码

    一.编码规则      Base64编码的思想是是采用64个基本的ASCII码字符对数据进行重新编码.它将需要编码的数据拆分成字节数组.以3个字节为一组.按顺序排列24 位数据,再把这24位数据分成4 ...

  6. 什么是 gnuplot

    Gnuplot是一个命令行的交互式绘图工具(command-driven interactive function plotting program).用户通过输入命令,可以逐步设置或修改绘图环境,并 ...

  7. nested exception is java&period;sql&period;SQLException&colon; Cannot convert value &&num;39&semi;0000-00-00 00&colon;00&colon;00&&num;39&semi; from column 14 to TIMESTAMP&period;

    无法将"0000-00-00 00:00:00"转换为TIMESTAMP 2017-05-08 00:56:59 [ERROR] - cn.kee.core.dao.impl.Ge ...

  8. iTextCharp c&num;

    //引用iTextSharp static void testPdf() { var document = new Document(); var writer = PdfWriter.GetInst ...

  9. Java学习之--List和ArrayList

    首先明确: List是一个接口,不能被创造实例对象 ArrayList是List 接口的一个实现类,ArrayList类实现了List接口(List接口有多个实现类,例如ArrayList,Linke ...

  10. CentOS7&plus;CDH5&period;14&period;0安装全流程记录,图文详解全程实测-5安装JDK及安装mysql数据库

    1.安装JDK 可以不用卸载自带的openjdk,配好环境变量即可. 下载文件:jdk-8u151-linux-x64.tar.gz 附:JDK各版本下载地址:https://www.oracle.c ...