tomcat部署項目報錯NoSuchMethodException#addServlet,addFilter

來源:互聯網
上載者:User

標籤: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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.