码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat部署项目报错NoSuchMethodException#addServlet,addFilter

时间:2016-10-22 17:53:37      阅读:247      评论:0      收藏:0      [点我收藏+]

标签:apache   matching   net   filter   com   htm   ref   src   string   

java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter
 
这个问题折腾了我三四天,现在终于找到原因了。
是web-inf/lib包下包含了catalina.jar这个jar包,导致加载的时候使用了这个jar但是没有找到addServlet,addFilter
解决方法:Go to your WEB-INf/lib and remove catalina.*.jar, then restart your tomcat. 
 
 
还是老外的网站牛逼。百度了几天答案千篇一律:解决方法为:在Tomacat7的context.xml文件里的<Context>中加上<Loader delegate="true" />
http://nvry.iteye.com/blog/1726163  
技术分享
<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <Loader delegate="true" />
</Context>

技术分享

可能能解决某些人的问题吧,反正解决不了我的问题。
 
 
######################
另一个问题:WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclipse.jst.jee.server:firstProject‘ did not find a matching property.
 
这个教程对这个问题很全面的解决和分析
 
 
 
 
 
########## 还有一个问题 ###############
The method list(String, Object[]) is ambiguous for the type BaseDAOImpl<M,PK
 
解决方法:在eclipse.ini -vmargs后面添加  -DtolerateIllegalAmbiguousVarargsInvocation=true ;重启eclipse,并clean一下项目 重新编译即可。
 

tomcat部署项目报错NoSuchMethodException#addServlet,addFilter

标签:apache   matching   net   filter   com   htm   ref   src   string   

原文地址:http://www.cnblogs.com/xxchao/p/5987730.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!