spring 代理 servlet 问题

问题描述

我的项目上面使用了spring代理servlet,XML文件都配置没问题,可是我一访问servlet就老提示错误HTTP Status 500 - type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: Wrapper cannot find servlet class org.springFramework.web.servlet.DispatcherServlet or a class it depends onorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)java.lang.Thread.run(Thread.java:595) root cause java.lang.ClassNotFoundException: org.springFramework.web.servlet.DispatcherServletorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)java.lang.Thread.run(Thread.java:595) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.Apache Tomcat/5.0.28==========================tomcat log 2008-10-10 19:43:42 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]2008-10-10 19:43:43 StandardContext[/jsp-examples]ContextListener: contextInitialized()2008-10-10 19:43:43 StandardContext[/jsp-examples]SessionListener: contextInitialized()2008-10-10 19:43:46 StandardContext[/reserve]Loading Spring root WebApplicationContext2008-10-10 19:43:55 StandardContext[/reserve]Initializing WebApplicationContext for Struts ActionServlet 'action', module ''2008-10-10 19:43:55 StandardContext[/servlets-examples]ContextListener: contextInitialized()2008-10-10 19:43:55 StandardContext[/servlets-examples]SessionListener: contextInitialized()2008-10-10 19:45:15 StandardContext[/reserve]Marking servlet ListServlet as unavailable2008-10-10 19:45:15 StandardContext[/reserve]Error loading WebappClassLoader  delegate: false  repositories:    /WEB-INF/classes/----------> Parent Classloader:StandardClassLoader  delegate: true  repositories:    file:I:TomcatTomcat5.0sharedclasses----------> Parent Classloader:StandardClassLoader  delegate: true  repositories:    file:I:TomcatTomcat5.0commonclasses    file:I:TomcatTomcat5.0commonendorsedxalan.jar    file:I:TomcatTomcat5.0commonlibant-launcher.jar    file:I:TomcatTomcat5.0commonlibant.jar    file:I:TomcatTomcat5.0commonlibcommons-collections-3.1.jar    file:I:TomcatTomcat5.0commonlibcommons-dbcp-1.2.1.jar    file:I:TomcatTomcat5.0commonlibcommons-el.jar    file:I:TomcatTomcat5.0commonlibcommons-pool-1.2.jar    file:I:TomcatTomcat5.0commonlibjasper-compiler.jar    file:I:TomcatTomcat5.0commonlibjasper-runtime.jar    file:I:TomcatTomcat5.0commonlibjsp-api.jar    file:I:TomcatTomcat5.0commonlibmsbase.jar    file:I:TomcatTomcat5.0commonlibmssqlserver.jar    file:I:TomcatTomcat5.0commonlibmsutil.jar    file:I:TomcatTomcat5.0commonlibnaming-common.jar    file:I:TomcatTomcat5.0commonlibnaming-factory.jar    file:I:TomcatTomcat5.0commonlibnaming-java.jar    file:I:TomcatTomcat5.0commonlibnaming-resources.jar    file:I:TomcatTomcat5.0commonlibservlet-api.jar    file:I:TomcatTomcat5.0commonlibtools.jar----------> Parent Classloader:sun.misc.Launcher$AppClassLoader@181afa3 org.springFramework.web.servlet.DispatcherServletjava.lang.ClassNotFoundException: org.springFramework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:964) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595)2008-10-10 19:45:15 StandardWrapperValve[ListServlet]: Allocate exception for servlet ListServletjavax.servlet.ServletException: Wrapper cannot find servlet class org.springFramework.web.servlet.DispatcherServlet or a class it depends on at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:974) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595)----- Root Cause -----java.lang.ClassNotFoundException: org.springFramework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:964) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595)   =========================   web.xml <!----><context-param><param-name>contextConfigLocation</param-name><param-value>/WEB-INF/classes/config/spring/applicationContext-*.xml</param-value></context-param><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><!----><filter><filter-name>ActivityTimeFilter</filter-name><filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class><init-param><param-name>targetFilterLifecycle</param-name><param-value>true</param-value></init-param></filter><filter-mapping><filter-name>ActivityTimeFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping><!----><servlet><servlet-name>ListServlet</servlet-name><servlet-class>org.springFramework.web.servlet.DispatcherServlet</servlet-class></servlet><!----><servlet-mapping><servlet-name>ListServlet</servlet-name><url-pattern>/servlet/list_xml</url-pattern></servlet-mapping>  ======================= applicationContext-servlet.xml <!----><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"><bean id="ListServlet" class="com.reserve.web.servlet.ListServlet"><property name="listServletLogic" ref="ListServletLogic"></bean></beans>  =========================== spring.jar包我也都加上了,版本也都对~找了半天我还是找不出来什么地方错误,请指教~谢谢~问题补充:spring-webmvc.jar 这个我也试 过了,也不行,然后我才换的spring.jar的,还是不行是不是我配置文件写的有问题呢?问题补充:我spring是2.0的,是eclipse里面我用myeclipse加载的,选择的是2.0问题补充:这个是我今天的tomcat的log2008-10-10 19:56:26 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]2008-10-10 19:56:26 StandardContext[/jsp-examples]ContextListener: contextInitialized()2008-10-10 19:56:26 StandardContext[/jsp-examples]SessionListener: contextInitialized()2008-10-10 19:56:28 StandardContext[/reserve]Loading Spring root WebApplicationContext2008-10-10 19:56:34 StandardContext[/reserve]Marking servlet ListServlet as unavailable2008-10-10 19:56:34 StandardContext[/reserve]Error loading WebappClassLoader  delegate: false  repositories:    /WEB-INF/classes/----------> Parent Classloader:StandardClassLoader  delegate: true  repositories:    file:I:TomcatTomcat5.0sharedclasses----------> Parent Classloader:StandardClassLoader  delegate: true  repositories:    file:I:TomcatTomcat5.0commonclasses    file:I:TomcatTomcat5.0commonendorsedxalan.jar    file:I:TomcatTomcat5.0commonlibant-launcher.jar    file:I:TomcatTomcat5.0commonlibant.jar    file:I:TomcatTomcat5.0commonlibcommons-collections-3.1.jar    file:I:TomcatTomcat5.0commonlibcommons-dbcp-1.2.1.jar    file:I:TomcatTomcat5.0commonlibcommons-el.jar    file:I:TomcatTomcat5.0commonlibcommons-pool-1.2.jar    file:I:TomcatTomcat5.0commonlibjasper-compiler.jar    file:I:TomcatTomcat5.0commonlibjasper-runtime.jar    file:I:TomcatTomcat5.0commonlibjsp-api.jar    file:I:TomcatTomcat5.0commonlibmsbase.jar    file:I:TomcatTomcat5.0commonlibmssqlserver.jar    file:I:TomcatTomcat5.0commonlibmsutil.jar    file:I:TomcatTomcat5.0commonlibnaming-common.jar    file:I:TomcatTomcat5.0commonlibnaming-factory.jar    file:I:TomcatTomcat5.0commonlibnaming-java.jar    file:I:TomcatTomcat5.0commonlibnaming-resources.jar    file:I:TomcatTomcat5.0commonlibservlet-api.jar    file:I:TomcatTomcat5.0commonlibtools.jar----------> Parent Classloader:sun.misc.Launcher$AppClassLoader@181afa3 org.springFramework.web.servlet.DispatcherServletjava.lang.ClassNotFoundException: org.springFramework.web.servlet.DispatcherServletat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:964)at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)at org.apache.commons.digester.Rule.end(Rule.java:276)at org.apache.commons.digester.Digester.endElement(Digester.java:1058)at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)at org.apache.commons.digester.Digester.parse(Digester.java:1567)at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)at org.apache.catalina.core.StandardService.start(StandardService.java:480)at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)at org.apache.catalina.startup.Catalina.start(Catalina.java:556)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)2008-10-10 19:56:34 StandardContext[/reserve]Servlet /reserve threw load() exceptionjavax.servlet.ServletException: Wrapper cannot find servlet class org.springFramework.web.servlet.DispatcherServlet or a class it depends onat org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:974)at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)at org.apache.commons.digester.Rule.end(Rule.java:276)at org.apache.commons.digester.Digester.endElement(Digester.java:1058)at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)at org.apache.commons.digester.Digester.parse(Digester.java:1567)at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)at org.apache.catalina.core.StandardService.start(StandardService.java:480)at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)at org.apache.catalina.startup.Catalina.start(Catalina.java:556)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)----- Root Cause -----java.lang.ClassNotFoundException: org.springFramework.web.servlet.DispatcherServletat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:964)at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)at org.apache.commons.digester.Rule.end(Rule.java:276)at org.apache.commons.digester.Digester.endElement(Digester.java:1058)at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)at org.apache.commons.digester.Digester.parse(Digester.java:1567)at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)at org.apache.catalina.core.StandardService.start(StandardService.java:480)at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)at org.apache.catalina.startup.Catalina.start(Catalina.java:556)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)2008-10-10 19:56:35 StandardContext[/reserve]Initializing WebApplicationContext for Struts ActionServlet 'action', module ''2008-10-10 19:56:35 StandardContext[/servlets-examples]ContextListener: contextInitialized()2008-10-10 19:56:35 StandardContext[/servlets-examples]SessionListener: contextInitialized()2008-10-10 19:56:55 StandardWrapperValve[ListServlet]: Servlet ListServlet is currently unavailable2008-10-10 19:56:56 StandardWrapperValve[ListServlet]: Servlet ListServlet is currently unavailable2008-10-10 19:56:57 StandardWrapperValve[ListServlet]: Servlet ListServlet is currently unavailable

解决方案

看错误的提示,提示的是找不到org.springFramework.web.servlet.DispatcherServlet你检查一下,这个类是不是两个jar包都有,或者根本没有这个类
解决方案二:
看看加载是否正常,或许没加载进去哦
解决方案三:
你的spring用的什么版本的,spring2.5之后,spring mvc就不在spring.jar里面了,找一找spring-webmvc.jar你可以去maven2仓库里面找一下http://repo1.maven.org/maven2/org/springframework/spring-webmvc/

时间: 2024-11-05 19:41:29

spring 代理 servlet 问题的相关文章

Spring整合Servlet

在应用中一般普通的Java Pojo都是由Spring来管理的,所以使用autowire注解来进行注入不会产生问题,但是有两个东西是例外的,一个是Filter,一个是Servlet,这两样东西都是由Servlet容器来维护管理的,所以若想和其他的Bean一样使用Autowire来注入的话,是需要做一些额外的功夫的.  第1步:在web.xml中注册Spring的监听器 <!-- Spring --> <context-param> <param-name>context

Spring代理处理参数和方法

Spring代理处理参数和方法: package com.rx.spring.dynamicmock; public interface UserManager { public void addUser(String username, String password); public void deleteUser(int id); } package com.rx.spring.dynamicmock; public class UserManagerImpl implements Use

Spring代理的问题 报java.lang.ClassCastException: $Proxy19 只有一个出问题 诡异~ 无解啊

问题描述 通过SpringAop配置的service报一下的错误 BaseService baseService; baseService = (BaseService) applicationContext.getBean("service_111"); BaseService 是一个接口,beanId为service_111的类实现这个接口,而且还有很多类实现这个接口,唯独调用这个累的时候进行强转的时候报以下错误,使用junit测试都好用,放在测试环境就报错 ,请大家帮忙! 这个时

Spring Boot Servlet

上一篇我们对如何创建Controller 来响应JSON 以及如何显示数据到页面中,已经有了初步的了解. Web开发使用 Controller 基本上可以完成大部分需求,但是我们还可能会用到 Servlet.Filter.Listener.Interceptor 等等. 当使用spring-Boot时,嵌入式Servlet容器通过扫描注解的方式注册Servlet.Filter和Servlet规范的所有监听器(如HttpSessionListener监听器). Spring boot 的主 Ser

Spring项目的配置文件们(web.xml context servlet springmvc)

我们的spring项目目前用到的配置文件包括1--web.xml文件,这是java的web项目的配置文件.我理解它是servlet的配置文件,也就是说,与spring无关.即使你开发的是一个纯粹jsp页面的web项目,你也必须配置这个文件.我们的java web项目肯定写了很多servlet代码,这些servlet需要运行在servlet容器中,这个容器就是tomcat的重要组件.也就是,你的web项目需要运行在tomcat中,那么你必须提供一个web.xml文件作为配置文件.在这个文件中,通过

Spring面试问答Top 25

原文地址: http://www.importnew.com/15851.html#spring_framework 问题清单: 什么是Spring框架?Spring框架有哪些主要模块? 使用Spring框架有什么好处? 什么是控制反转(IOC)?什么是依赖注入? 请解释下Spring中的IOC? BeanFactory和ApplicationContext有什么区别? 将Spring配置到你的应用中共有几种方法? 什么基于XML的配置? 什么基Java的配置? 怎样用注解的方式配置Spring

Struts+Spring+Hibernate实现上传下载

上传|下载 引言 文件的上传和下载在J2EE编程已经是一个非常古老的话题了,也许您马上就能掰着指头数出好几个著名的大件:如SmartUpload.Apache的FileUpload.但如果您的项目是构建在Struts+Spring+Hibernate(以下称SSH)框架上的,这些大件就显得笨重而沧桑了,SSH提供了一个简捷方便的文件上传下载的方案,我们只需要通过一些配置并辅以少量的代码就可以完好解决这个问题了. 本文将围绕SSH文件上传下载的主题,向您详细讲述如何开发基于SSH的Web程序.SS

Spring Security 入门详解(转)

1.Spring Security介绍 Spring Security是基于spring的应用程序提供声明式安全保护的安全性框架,它提供了完整的安全性解决方案,能够在web请求级别和方法调用级别 处理身份证验证和授权.它充分使用了依赖注入和面向切面的技术. Spring security主要是从两个方面解决安全性问题: web请求级别:使用servlet过滤器保护web请求并限制URL级别的访问 方法调用级别:使用Spring AOP保护方法调用,确保具有适当权限的用户采用访问安全保护的方法.

Spring Framework 4.2 中的新功能和增强功能

至今为止,Spring Framework 的最新版本为 4.2.1.RELEASE. 那么 Spring Framework 4.2 中的又有哪些新功能和增强功能呢? 核心容器改进 如 @bean 注释,就如同得到发现和处理 Java 8 默认方法一样,可以允许组合配置类与默认@bean 接口方法. 配置类现在可以声明 @import 作为常规组件类,允许引入的配置类和组件类进行混合. 配置类可以声明一个 @Order 值,用来得到相应的处理顺序(例如重写 bean 的名字),即使通过类路径扫