Tomacat7启动报错-org.apache.catalina.deploy.WebXml addFilter

Tomacat7启动报错如下:

java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter
 at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:855)
 at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
 at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
 at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
 at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1825)
 at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1201)
 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 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)
2012-11-15 12:31:37 org.apache.catalina.startup.ContextConfig parseWebXml
严重: Parse error in application web.xml file at jndi:/localhost/ssy/WEB-INF/web.xml
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter
 at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2687)
 at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2719)
 at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1054)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
 at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
 at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1825)
 at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1201)
 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 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: java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter
 at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:855)
 at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
 at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051)
 ... 26 more 

 

解决方法为:在Tomacat7的context.xml文件里的<Context>中加上<Loader delegate="true" />

你可能感兴趣的:(Tomacat7启动报错-org.apache.catalina.deploy.WebXml addFilter)