问题描述
严重: End event threw exceptionjava.lang.reflect.InvocationTargetExceptionat 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:597)at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:928)at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:193)at org.apache.tomcat.util.digester.Rule.end(Rule.java:229)at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1138)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:1782)at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)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:511)at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)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:119)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:1642)at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:365)at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1072)at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4377)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)at org.apache.catalina.core.StandardService.start(StandardService.java:519)at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)at org.apache.catalina.startup.Catalina.start(Catalina.java:581)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:597)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)Caused by: java.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name struts2at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:2275)... 46 more2010-9-28 14:04:32 org.apache.catalina.startup.ContextConfig applicationWebConfig严重: Parse error in application web.xml file at jndi:/localhost/struts2/WEB-INF/web.xmljava.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name struts2at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2806)at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2832)at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1141)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:1782)at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)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:511)at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)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:119)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:1642)at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:365)at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1072)at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4377)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)at org.apache.catalina.core.StandardService.start(StandardService.java:519)at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)at org.apache.catalina.startup.Catalina.start(Catalina.java:581)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:597)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)Caused by: java.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name struts2at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:2275)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:597)at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:928)at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:193)at org.apache.tomcat.util.digester.Rule.end(Rule.java:229)at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1138)... 38 more2010-9-28 14:04:32 org.apache.catalina.startup.ContextConfig applicationWebConfig严重: Occurred at line 16 column 192010-9-28 14:04:32 org.apache.catalina.startup.ContextConfig start严重: Marking this application unavailable due to previous error(s)2010-9-28 14:04:32 org.apache.catalina.core.StandardContext start严重: Error getConfigured2010-9-28 14:04:32 org.apache.catalina.core.StandardContext start严重: Context [/struts2] startup failed due to previous errors按照教程写了个struts的项目,部署后启动tomcat报上面的错误,不部署struts的项目单独启动tomcat没问题,是怎么会事啊?谁知道,指导下,谢谢。
解决方案
java.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name struts2 非法参数 ,struts2的过滤器有问题,还有就是看看struts2的jar全吗?参考:<!-- 配置Struts2 --> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
解决方案二:
在web.xml中配置过滤器有问题,你的过滤器struts2不存在