-
java.lang.OutOfMemoryError: Java heap space
Myeclipse里面部署的java web项目,浏览器访问的时候出现错误:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Filter execution threw an exception
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
com.dt.components.extable.filter.EXTableFilter.doFilter(EXTableFilter.java:151)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
com.dt.jframe.web.filters.SessionCheck.doFilter(SessionCheck.java:109)root cause
java.lang.OutOfMemoryError: Java heap space
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
网上找了很多,都是说的jvm的内存不够用,网友提供的需要设置的地方如下:
1.可以在windows 更改系统环境变量
加上JAVA_OPTS=-Xms64m -Xmx512m2,如果用的tomcat,在windows下,可以在
C:\tomcat5.5.9\bin\catalina.bat 中加上:
set JAVA_OPTS=-Xms64m -Xmx256m
位置在: rem Guess CATALINA_HOME if not defined 这行的下面加合适.
3.如果是linux系统
Linux 在{tomcat_home}/bin/catalina.sh的前面,加
set JAVA_OPTS='-Xms64 -Xmx512'但是上面的方法我都实验了,对我的这个问题没用,最后找到一个解决办法,我的问题解决了,解决方法如下:在Myeclipse里面设
置:Myeclipse->preferences->myeclipse->Application
servers->tomcat->tomcat5.x->JDK面板中的Optional Java VM
arguments中添加-Xms512m -Xmx1024m -XX:PermSize=128M -XX:MaxNewSize=512m
-XX:MaxPermSize=256m -Djava.awt.headless=true -verbose:gc即可解决问题这有一个连接地址,可以看一下详细的http://blog.****.net/bjd14/article/details/3896153
相关文章
- Windows 7上打开IE浏览器报错:无法启动此程序,因为计算机中丢失api-ms-win-core-path-|1-1-0.dll。尝试重新安装该程序以解决此问题。
- vs+opencv环境配置出现程序无法启动及提示无法打开opencv_world400d.lib问题的解决方法
- 解决eclipse项目运行内存溢出问题
- Windows 7上打开IE浏览器报错:无法启动此程序,因为计算机中丢失api-ms-win-core-path-|1-1-0.dll。尝试重新安装该程序以解决此问题。 - 小昊子
- 关于“VS无法启动程序,系统找不到指定的文件“这个问题的一个解决方法
- 使用JProfiler解决Java应用程序内存溢出问题实例
- 解决Bug之路:记一次内存溢出问题的查找
- 启动Tomcat内存溢出解决:java.lang.OutOfMemoryError: PermGen space
- eclipse优化-validaton验证禁用+项目启动启动内存溢出错误解决方案
- 在使用VS中运行程序时出现无法启动程序“...”拒绝访问的问题解决方案