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

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一下项目 重新编译即可。
 
原文地址:https://www.cnblogs.com/xxchao/p/5987730.html