您的位置:首页 > 编程语言 > Java开发

另类的java.lang.OutOfMemoryError

2017-12-13 15:40 267 查看
  一看到内存溢出,我第一想到的是分析dump文件,昨天的事情就颠覆了我的认知,分析dump没有发现问题。仔细看堆栈,然后看代码:

List<ATTransVO> lstATTransVO = new ArrayList<ATTransVO>(10000000);

这个初始化的数值太大导致内存不够用,难怪分析不出问题来。

   

2017-12-12 17:24:52,227

StackTrace : com.gg.lcam.component.workflow.entrycondition.ReceiptCheckEntryCondition$HasAttachmentOperation.canEntry(ReceiptCheckEntryCondition.java:341)
javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:112)
at com.gg.top.atm.client.attachment.dao.AttachmentDAO.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentDAO.java:1367)
at com.gg.top.atm.client.attachment.appservice.AttachmentAppService.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentAppService.java:842)
at com.gg.top.atm.client.ejb.AttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentServiceImpl.java:221)

..................................................................................

; nested exception is: 
java.lang.OutOfMemoryError: Java heap space; nested exception is: javax.transaction.TransactionRolledbackException: EJB Exception: : java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:112)
at com.gg.top.atm.client.attachment.dao.AttachmentDAO.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentDAO.java:1367)
at com.gg.top.atm.client.attachment.appservice.AttachmentAppService.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentAppService.java:842)
at com.gg.top.atm.client.ejb.AttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentServiceImpl.java:221)

..................................................................................

; nested exception is: 
java.lang.OutOfMemoryError: Java heap space

javax.transaction.TransactionRolledbackException: EJB Exception: : java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:112)
at com.gg.top.atm.client.attachment.dao.AttachmentDAO.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentDAO.java:1367)
at com.gg.top.atm.client.attachment.appservice.AttachmentAppService.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentAppService.java:842)
at com.gg.top.atm.client.ejb.AttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentServiceImpl.java:221)

..................................................................................

; nested exception is: 
java.lang.OutOfMemoryError: Java heap space
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledback(EJBRuntimeUtils.java:200)
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:887)
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:809)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:518)
at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:49)
at weblogic.ejb.container.internal.BaseRemoteObject.__WL_postInvokeTxRetry(BaseRemoteObject.java:444)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:53)
at com.gg.top.atm.client.ejb.AttachmentService_fcvlog_IAttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(Unknown Source)
at com.gg.top.atm.client.ejb.AttachmentService_fcvlog_IAttachmentServiceImpl_CBV.queryAttachmentByJobTypeCodeAndObjectIdLocal(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

..................................................................................

Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:112)
at com.gg.top.atm.client.attachment.dao.AttachmentDAO.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentDAO.java:1367)
at com.gg.top.atm.client.attachment.appservice.AttachmentAppService.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentAppService.java:842)
at com.gg.top.atm.client.ejb.AttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentServiceImpl.java:221)

..................................................................................

javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:112)
at com.gg.top.atm.client.attachment.dao.AttachmentDAO.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentDAO.java:1367)
at com.gg.top.atm.client.attachment.appservice.AttachmentAppService.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentAppService.java:842)
at com.gg.top.atm.client.ejb.AttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentServiceImpl.java:221)

..................................................................................

; nested exception is: 
java.lang.OutOfMemoryError: Java heap space; nested exception is: javax.transaction.TransactionRolledbackException: EJB Exception: : java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:112)
at com.gg.top.atm.client.attachment.dao.AttachmentDAO.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentDAO.java:1367)
at com.gg.top.atm.client.attachment.appservice.AttachmentAppService.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentAppService.java:842)
at com.gg.top.atm.client.ejb.AttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentServiceImpl.java:221)

..................................................................................

; nested exception is: 
java.lang.OutOfMemoryError: Java heap space
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:818)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:518)
at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:49)
at weblogic.ejb.container.internal.BaseRemoteObject.__WL_postInvokeTxRetry(BaseRemoteObject.java:444)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:53)
at com.gg.top.atm.client.ejb.AttachmentService_fcvlog_IAttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(Unknown Source)
at com.gg.top.atm.client.ejb.AttachmentService_fcvlog_IAttachmentServiceImpl_CBV.queryAttachmentByJobTypeCodeAndObjectIdLocal(Unknown Source)

..................................................................................

Caused by: javax.transaction.TransactionRolledbackException: EJB Exception: : java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:112)
at com.gg.top.atm.client.attachment.dao.AttachmentDAO.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentDAO.java:1367)
at com.gg.top.atm.client.attachment.appservice.AttachmentAppService.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentAppService.java:842)
at com.gg.top.atm.client.ejb.AttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentServiceImpl.java:221)

..................................................................................

; nested exception is: 
java.lang.OutOfMemoryError: Java heap space
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledback(EJBRuntimeUtils.java:200)
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:887)
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:809)
... 104 more

Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:112)
at com.gg.top.atm.client.attachment.dao.AttachmentDAO.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentDAO.java:1367)
at com.gg.top.atm.client.attachment.appservice.AttachmentAppService.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentAppService.java:842)
at com.gg.top.atm.client.ejb.AttachmentServiceImpl.queryAttachmentByJobTypeCodeAndObjectIdLocal(AttachmentServiceImpl.java:221)

..................................................................................
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: