问题描述
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、