eclipse開發報錯收集

1.GC overhead limit  exceeded

這個是JDK6新添的錯誤類型。是發生在GC佔用大量時間爲釋放很小空間的時候發生的,是一種保護機制。解決方案是,關閉該功能,使用—— -XX:-UseGCOverheadLimit

這裏要查看是否有使用大內存的代碼或死循環。

Sun官方解釋:

The parallel / concurrent collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option-XX:-UseGCOverheadLimit to the command line

http://blog.csdn.net/qq295445028/article/details/7530175



2.Unable to compile class for JSP(不能編譯class)

今天上班的時候eclipse自己跳掉了(公司的破電腦~),然後重啓tomcat什麼的,重新部署什麼的都不行,就報錯。

網上搜了一通後去看了webapp目錄果然發現多了兩個包,仔細翻了項目就是沒發現那兩個包啊,不知道怎麼跑到webapp下的,不管了就刪了,於是就好了,汗

org.apache.jasper.JasperException: Unable to compile class for JSP: 
               
An error occurred at line: 23 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
               
Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    com.challenger.core.lang.filter.EncodingFilter.doFilter(EncodingFilter.java:46)

結論:1、我的工程裏的servlet.jar、jsp-servlet.jar的版本比較低與tomcat6.0相比。

           2、tomcat的下面的lib裏面不能與工程裏面的jar相同(如果部署到tomcat上)。

           3、把工程裏面的兩個jar包刪除了,就解決了。

http://blog.csdn.net/arui_email/article/details/8220728


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章