HTTP Status 500 - javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space

详细错误信息


HTTP Status 500 - javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space

type Exception report

message javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.auth.filter.AuthorizationFilter.doFilterInternal(AuthorizationFilter.java:77)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:115)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause

javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:916)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:845)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:1102)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.auth.filter.AuthorizationFilter.doFilterInternal(AuthorizationFilter.java:77)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:115)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause

java.lang.OutOfMemoryError: PermGen space
    java.lang.Class.getDeclaredConstructors0(Native Method)
    java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    java.lang.Class.getConstructor0(Unknown Source)
    java.lang.Class.newInstance(Unknown Source)
    org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:120)
    org.apache.jsp.index_jsp._jspx_meth_c_005fset_005f0(index_jsp.java:1115)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:85)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.auth.filter.AuthorizationFilter.doFilterInternal(AuthorizationFilter.java:77)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:115)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.54 logs.

Apache Tomcat/7.0.54

PermGen space



PermGen space的全称是Permanent Generation space,是指内存的永久保存区域OutOfMemoryError: PermGen space从表面上看就是内存益出,解决方法也一定是加大内存。说说为什么会内存益出:这一部分用于存放Class和Meta的信息,Class在被 Load的时候被放入PermGen space区域,它和和存放Instance的Heap区域不同,GC(Garbage Collection)不会在主程序运行期对PermGen space进行清理,所以如果你的APP会LOAD很多CLASS的话,就很可能出现PermGen space错误。这种错误常见在web服务器对JSP进行pre compile的时候。

解决方法



只需要在Tomcat的bin目录下的“”文件中添加一行就可以解决问题

JAVA_OPTS=‘-Xms512m -Xmx2048m -XX:PermSize=128M -XX:MaxNewSize=256m -XX:MaxPermSize=256m‘

具体位置如下图:

时间: 2024-10-26 14:42:10

HTTP Status 500 - javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space的相关文章

HTTP Status 500 - javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag

我在项目中导入了jar,还是不能使用EL表达式,一运行就出现了下面的额错误: org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver错误解决办法

今天不用eclipse.myeclipse等开发工具,纯手写JSP页面(有点作死)时突然出现以前从来没遇到过的问题,报错如下: HTTP Status 500 - java.lang.NoClassDefFoundError: javax/el/ELResolver type Exception report message java.lang.NoClassDefFoundError: javax/el/ELResolver description The server encountered

tomcat6.0发布项目打开jsp页面报错:HTTP Status 500 - javax.servlet.ServletException

今天遇到一个tomcat的部署的问题,问题根源在于server.xml 的配置里. 错误如标题,说HTTP Status 500 - javax.servlet.ServletException:XXX文件找不到,几经查找测试,程序并没有错误,有人说是jsp-api.jar和serlet-api.jar包冲突,调试发现并不能解决问题,后来才发现问题的所在: 开始的server.xml 配置对Host 以及其内的Context 是如下配置的: <Host name="localhost&qu

javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation:

javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;" th

JAVA编译异常处理:java.lang.OutOfMemoryError: PermGen space

在Intellij开发工具中编译JAVA项目,出现以下错误: 六月 21, 2016 6:28:07 下午 org.apache.tomcat.util.modeler.BaseModelMBean invoke严重: Exception invoking method manageAppjava.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.la

java.lang.OutOfMemoryError: PermGen space with weblogic

Error info:java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at weblogi

tomcat服务器java.lang.OutOfMemoryError: PermGen space

一挂就报内存溢出 下面是TOMCAT日志 JAVA程序是没有报错, Nov 24, 2009 4:07:02 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError: PermGen space Nov 24, 2009 4:07:02 PM org.apache.cat

jvm 内存溢出 在myeclipse中加大tomcat的jvm内存 java.lang.OutOfMemoryError: PermGen space

使用myeclipse启动部署在tomcat7下的三个项目报出java.lang.OutOfMemoryError: PermGen space 解决办法: 在myeclipse中加大jvm内存方法:Window->Preferences->Myeclipse->Services->Tomcat->Tomcat 6.x->JDK,在Optional Java VM arguments:下边的输入框里输入:-Xms128m -Xmx512m -XX:PermSize=12

Eclipse:java.lang.OutOfMemoryError: PermGen space

先是好端端的上不了网,然后电脑就重启,重启之后,整个项目就报"java.lang.OutOfMemoryError: PermGen space" 网上说了很多方法,什么修改eclipse.ini,修改tomcat bin目录下的catalina.sh文件,但是对我问题没有一点用处, 最后,解决方案如下: 记住一定要换行啊!