org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '

问题描述

SSH框架程序中,tomcat运行时输入.do提示以下错误:哪位高手能帮忙解决一下!2010-9-1716:50:54org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletactionthrewexceptionorg.springframework.beans.factory.NoSuchBeanDefinitionException:Nobeannamed'/index'isdefinedatorg.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)atorg.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:968)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)atorg.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:885)atorg.springframework.web.struts.DelegatingActionProxy.getDelegateAction(DelegatingActionProxy.java:127)atorg.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:109)atorg.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)atorg.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)atorg.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)atorg.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)atorg.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)atorg.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)atorg.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)atorg.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:617)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:717)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.jqz.util.EncodingFilter.doFilter(EncodingFilter.java:23)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(Thread.java:619)

解决方案

解决方案二:
/index没有定义
解决方案三:
中秋快乐,希望楼主早日解决我是来学习的
解决方案四:
路径配置错误问题,检查配置文件,我估计是在struts-config.xml配置文件中,你有用到<beanname="/index"/>,但在spring的配置文件中与之对应路径不存在,比如<beanname="/index"class="com.xxx.xxx.YourBean"><propertyname="xxxdao"ref="xxxService"/></bean>可能是你的路径写错了,要不就是这个/index对应的Bean你没有定义。个人观点,希望对你有用!好好检查下配置文件
解决方案五:
没有在配置文件beans.xml中定义对应的index相应的bean:<beanname="/welcome.html"class="cn.kalatu.shfy.controller.Welcome"><propertyname="commandName"value="loginForm"></property><propertyname="commandClass"value="cn.kalatu.shfy.form.WelcomeForm"/><propertyname="successView"value="result"></property><propertyname="formView"value="welcomKalakala"/><propertyname="validator"><beanclass="cn.kalatu.shfy.validator.WelcommValidator"/></property></bean>
解决方案六:
org.springframework.beans.factory.NoSuchBeanDefinitionException:Nobeannamed'rrpBo'isdefined这个是怎么回事呀?
解决方案七:
name="/***.do"
解决方案八:
配置问题你去检查下你的那里没有定义index、

时间: 2024-10-04 16:23:20

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named &amp;#x27;的相关文章

nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException

You should autowire interface AbstractManager instead of class MailManager. If you have different implemetations of AbstractManager you can write @Component("mailService") and then @Autowired @Qualifier("mailService") combination to au

Spring Boot 调用 MongoRepository时报org.springframework.beans.factory.NoSuchBeanDefinitionException错误的解决办法

这个问题整整折腾了我两天,现在记录下来,希望可以帮助和我一样,遇到相同问题的小伙伴. 项目是分层的(Intellij IDEA中的模块Module),有API(Core)层,Service&Dao,Common,Model,上一张项目结构图.(不要在意为什么Service和Dao放在一起.这不是重点.) API中包括了Controller,Mongodb在Service&Dao层中,也就是API层,调用Service&Dao层,我敢用性命担保,所有注释,逻辑,都没有错,但是运行Sp

org.springframework.beans.factory.BeanCreationException: Error creating bean wit

问题描述 org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'txEasyjwebProcessorAdvice':Cannotresolvereferencetobean'transactionManager'whilesettingbeanproperty'transactionManager';nestedexceptionisorg.springframework.beans.

Spring-Bean的初始化(init方法和实现org.springframework.beans.factory.InitializingBean接口)

init()方法 在BEAN中增加一个方法inti(),用来完成初始化工作(去掉构造函数) 然后修改配置文档config.xml,指定Bean中要初始化的方法, 最后编写测试程序 Bean package com.gc.action; import java.util.Date; public class HelloWorld { private String msg=null;//该变量用来存储字符串 private Date date=null;//该变量用来存储日期 // public H

javase-关于Myeclipse的错误org.springframework.beans.factory.BeanCreationException

问题描述 关于Myeclipse的错误org.springframework.beans.factory.BeanCreationException 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreati

ibatis和Spring整合抛org.springframework.beans.factory.BeanCreationException

问题描述 『spring2.5和Ibatis2整合』spring配置文件如下:<?xmlversion="1.0"encoding="UTF-8"?><beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:p="http://

求解决org.springframework.beans.factory.BeanCreationException

问题描述 dwr和spring整合时出的问题,请问有谁知道这是怎么回事呢? 具体代码如下: dwr.xml <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" "http://getahead.org/dwr/dwr20.dtd">

spring hibernate-org.springframework.beans.factory.BeanCreationException

问题描述 org.springframework.beans.factory.BeanCreationException applicationContext.xml文件 <?xml version=""1.0"" encoding=""UTF-8""?> xmlns=""http://www.springframework.org/schema/beans"" xmlns:

急死人了,SSH整合报错,高手进来帮忙解决啊,org.springframework.beans.factory.BeanCreationException

问题描述 2010-11-13 12:37:39 org.apache.catalina.core.AprLifecycleListener init信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:InstalledMyEclipsebin;D:In