zoukankan      html  css  js  c++  java
  • 错误处理: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"/>

  • 相关阅读:
    mysql小数和类型转换函数
    concat()用法
    sql修改表名字段名
    having函数,case when与order by
    volatile实现原理与应用
    synchronized的实现原理与应用
    java8策略模式
    centos7快速升级gcc
    一个用户从发起请求到接收到响应,中间经过哪些服务,每个服务做什么事情
    Java注解
  • 原文地址:https://www.cnblogs.com/llguanli/p/8435102.html
Copyright © 2011-2022 走看看