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