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一下項目 從新編譯便可。
相關文章
相關標籤/搜索