• 错误处理:java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter


    当部署项目,启动Tomcat它已经错误:java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter


    SEVERE: End event threw exception
    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:1063)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1742)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2900)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
        at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1809)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1247)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:873)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:371)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)
    六月 12, 2014 7:22:06 下午 org.apache.catalina.startup.ContextConfig parseWebXml
    SEVERE: Parse error in application web.xml file at jndi:/localhost/carManager/WEB-INF/web.xml
    org.xml.sax.SAXParseException; systemId: jndi:/localhost/carManager/WEB-INF/web.xml; lineNumber: 33; columnNumber: 11; Error at (33, 11) : org.apache.catalina.deploy.WebXml addFilter
        at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2711)
        at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2743)
        at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1066)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1742)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2900)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
        at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1809)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1247)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:873)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:371)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)
    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:1063)
        ... 30 more
    六月 12, 2014 7:22:06 下午 org.apache.catalina.startup.ContextConfig parseWebXml
    SEVERE: Occurred at line 33 column 11
    六月 12, 2014 7:22:06 下午 org.apache.catalina.startup.ContextConfig configureStart
    SEVERE: Marking this application unavailable due to previous error(s)
    六月 12, 2014 7:22:06 下午 org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error getConfigured
    六月 12, 2014 7:22:06 下午 org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [/carManager] startup failed due to previous errors
    
    
    
    

    该解决方案:

    在tomacat型材context.xml在加<Loader delegate="true"/>

  • 相关阅读:
    Git常用操作命令
    百度地图集成--二
    百度地图的集成--超详细
    iOS开发系列--地图与定位
    整理了一份React-Native学习指南(转)
    iOS高级编程之JSON,XML数据解析
    iOS开发基础
    C#001
    C#00
    英语学习tips
  • 原文地址:https://www.cnblogs.com/gcczhongduan/p/4595016.html
Copyright © 2020-2023  润新知