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  
1
2
3
4
< 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一下项目 从新编译便可。
相关文章
相关标签/搜索