• java.lang.OutOfMemoryError: Java heap space


    报错信息:

    2014-11-17 10:22:51 org.apache.catalina.core.StandardWrapperValve invoke
    严重: Servlet.service() for servlet jsp threw exception
    java.lang.OutOfMemoryError: Java heap space
    at org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(Unknown Source)
    at org.apache.xerces.dom.DeferredDocumentImpl.synchronizeChildren(Unknown Source)
    at org.apache.xerces.dom.DeferredElementNSImpl.synchronizeChildren(Unknown Source)
    at org.apache.xerces.dom.ParentNode.getChildNodes(Unknown Source)
    at org.apache.jasper.xmlparser.ParserUtils.convert(ParserUtils.java:164)
    at org.apache.jasper.xmlparser.ParserUtils.convert(ParserUtils.java:179)
    at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:116)
    at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:133)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:222)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:181)
    at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:386)
    at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:450)
    at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1397)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:130)
    at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    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 com.eshore.sysmgr.util.LocalUserFilter.doFilter(LocalUserFilter.java:59)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    [2014-11-17 10:23:00.275]-[DEBUG] java.sql.Connection {conn-100121} Connection
    [2014-11-17 10:23:00.275]-[DEBUG] java.sql.Connection {conn-100121} Connection
    [2014-11-17 10:23:00.275]-[DEBUG] java.sql.Connection {conn-100121} Preparing Statement: SELECT * FROM SCHEDULE_JOB A WHERE ( HOST = ?) AND ( STATUS = ?)
    [2014-11-17 10:23:00.275]-[DEBUG] java.sql.Connection {conn-100121} Preparing Statement: SELECT * FROM SCHEDULE_JOB A WHERE ( HOST = ?) AND ( STATUS = ?)
    [2014-11-17 10:23:00.291]-[DEBUG] java.sql.PreparedStatement {pstm-100122} Executing Statement: SELECT * FROM SCHEDULE_JOB A WHERE ( HOST = ?) AND ( STATUS = ?)
    [2014-11-17 10:23:00.291]-[DEBUG] java.sql.PreparedStatement {pstm-100122} Executing Statement: SELECT * FROM SCHEDULE_JOB A WHERE ( HOST = ?) AND ( STATUS = ?)
    [2014-11-17 10:23:00.291]-[DEBUG] java.sql.PreparedStatement {pstm-100122} Parameters: [PC-20130106QSOB, 1]
    [2014-11-17 10:23:00.291]-[DEBUG] java.sql.PreparedStatement {pstm-100122} Parameters: [PC-20130106QSOB, 1]
    [2014-11-17 10:23:00.291]-[DEBUG] java.sql.PreparedStatement {pstm-100122} Types: [java.lang.String, java.lang.String]
    [2014-11-17 10:23:00.291]-[DEBUG] java.sql.PreparedStatement {pstm-100122} Types: [java.lang.String, java.lang.String]

    以下三种解决方法:

           1,从Intalled JREs里修改;window->Preferences->Java->Installed JREs,选择当前的JRE,然后edit它;在新窗口里设置Default VM Arguments为 -Xms128M -Xmx512M即可;这个设置应该对所有的工程都有效;

            2,如果仅仅是想对某个工程的有效的话,从Debug... 或Run...里修改,在(x)=Arguments里设置和上面相同的参数即可;

           3,如果小猫猫Tomcat的话,window->Preferences->Application Servers->Tomcat->Tomcat 6.x,选择JDK设置即可;

             大概就是这些设置,应该可以解决OutOfMemoryError: Java heap space的问题。

  • 相关阅读:
    SQL查询效率100w数据查询只要1秒
    超级实用且不花哨的js代码大全 (四) JavaScript[对象.属性]集锦
    Sql Server实用操作维护小技巧集合
    asp.net截取字符串方法
    自己整理的asp.net 缓存 相关资料
    【译】初识SSRS 通向报表服务的阶梯系列(一)
    【译】无处不在的数据 通向报表服务的阶梯系列(三)
    【译】SSRS基础 通向报表服务的阶梯系列(二)
    浅谈SQL Server中的事务日志(三)在简单恢复模式下日志的角色
    SQL Server中生成测试数据
  • 原文地址:https://www.cnblogs.com/tancp/p/4103071.html
Copyright © 2020-2023  润新知