標籤:apache matching net filter com htm ref src string
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServletjava.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. http://stackoverflow.com/questions/27102375/using-code-based-configuration-getting-java-lang-nosuchmethodexception-org-apac/27102430#27102430 還是老外的網站牛逼。百度了幾天答案千篇一律:解決方案為:在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. 解決Setting property ‘source‘ to ‘org.eclipse.jst.jee.server的問題http://blog.csdn.net/z69183787/article/details/19911935這個教程對這個問題很全面的解決和分析 ########## 還有一個問題 ###############The method list(String, Object[]) is ambiguous for the type BaseDAOImpl<M,PK http://www.cnblogs.com/wujianxingzhe/p/5623827.html原因: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一下項目 重新編譯即可。
tomcat部署項目報錯NoSuchMethodException#addServlet,addFilter