異常:java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext

來源:互聯網
上載者:User

1、今天開發,忽然遇到以下問題。

 

控制台列印如下:

2010-7-20 23:35:42 org.apache.catalina.core.StandardWrapperValve invoke
嚴重: Servlet.service() for servlet jsp threw exception
java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;


 at org.apache.jsp.index_jsp._jspInit(index_jsp.java:26)
 at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
 at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Unknown Source)
2010-7-20 23:35:43 org.apache.catalina.core.StandardWrapperValve invoke

 

2、此問題令人苦惱萬分,剛剛還能運行誰知一下出現一下這樣的錯誤。上網查了一下,網上說刪除項目中的一個jsp.jar包,可是我這個項目中根本沒有這個包。後來經過查證,問題解決如下:

    刪除項目,然扣重新布署。此時控制台沒有再顯示此錯誤。

 

3、開發中常常遇到這樣的奇怪問題,我們還是應當“路漫漫其修遠兮,吾將上下面求索”。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.