tomcat内存溢出设置JAVA_OPTS

 

eclipse中安装tomcat插件

http://blog.csdn.net/seuxiaoqi/article/details/6003549

 

应用启动tomcat时报错:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonProcessBean': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taobao.relationrecommend.biz.ao.RecommendCollection com.taobao.relationrecommend.biz.util.share.CommonProcessBean.recommendCollection; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'recommendCollection' defined in class path resource [biz/csk-relationrecommend.xml]: Cannot resolve reference to bean 'i2i023' while setting bean property 'initDaoBean' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'i2i023': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.taobao.relationrecommend.biz.bo.csk.CollectItemRecommendManager com.taobao.relationrecommend.biz.dao.Item2Item023.collectItemRecommendManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'collectitem': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.taobao.relationrecommend.biz.util.ItemLoader com.taobao.relationrecommend.biz.bo.csk.CollectItemRecommendManager.itemLoader; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itemLoader': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taobao.forest.service.StdCategoryServices com.taobao.relationrecommend.biz.util.ItemLoader.stdCategoryServices; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'forestServices' defined in class path resource [biz/forest-relationrecommend-client.xml]: Invocation of init method failed; nested exception is java.lang.StackOverflowError

解决办法:

Windows下在catalina.bat最前面加入

 

set JAVA_OPTS=-server -Xmx1152M -Xms1152M -Xmn512M -XX:PermSize=300M -XX:MaxPermSize=300M -Xss1024K -XX:+DisableExplicitGC -XX:SurvivorRatio=1 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:+CMSClassUnloadingEnabled -XX:LargePageSizeInBytes=128M -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=d:/tmp/log/jvm/java.hprof -verbose:gc -Xloggc:d:/tmp/log/jvm/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值