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 的一個bug,具體見
http://stackoverflow.com/questions/10852923/method-is-ambiguous-for-the-type-but-the-types-are-not-ambigues-and-the-error 。
解決方法:在eclipse.ini -vmargs后面添加 -DtolerateIllegalAmbiguousVarargsInvocation=true ;重啟eclipse,並clean一下項目 重新編譯即可。