[
https://issues.apache.org/jira/browse/DERBY-4294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725791#action_12725791
]
Kathey Marsden commented on DERBY-4294:
---------------------------------------
I got it with the Sun 1.6 JDK
va.sql.SQLException: Java exception: 'Java heap space:
java.lang.OutOfMemoryError'.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
at org.apache.derby.impl.jdbc.Util.javaException(Util.java:244)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
at
org.apache.derby.impl.jdbc.EmbedResultSet.noStateChangeException(EmbedResultSet.java:4404)
at
org.apache.derby.impl.jdbc.EmbedResultSet.getString(EmbedResultSet.java:679)
at
org.apache.derby.iapi.tools.i18n.LocalizedResource.getLocalizedString(LocalizedResource.java:336)
at
org.apache.derby.tools.JDBCDisplayUtil.DisplayRow(JDBCDisplayUtil.java:678)
at
org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDisplayUtil.java:385)
at
org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDisplayUtil.java:338)
at
org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDisplayUtil.java:241)
at
org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDisplayUtil.java:229)
at
org.apache.derby.impl.tools.ij.utilMain.displayResult(utilMain.java:432)
at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:506)
at
org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:350)
at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
at org.apache.derby.impl.tools.ij.Main.go(Main.java:210)
at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:177)
at org.apache.derby.impl.tools.ij.Main.main(Main.java:73)
at org.apache.derby.tools.ij.main(ij.java:59)
used by: java.sql.SQLException: Java exception: 'Java heap space:
java.lang.OutOfMemoryError'.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:11
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
... 19 more
used by: java.lang.OutOfMemoryError: Java heap space
at org.apache.derby.iapi.types.SQLChar.readExternal(SQLChar.java:1166)
at org.apache.derby.iapi.types.SQLClob.readExternal(SQLClob.java:726)
at org.apache.derby.iapi.types.SQLChar.getString(SQLChar.java:697)
at
org.apache.derby.impl.jdbc.EmbedResultSet.getString(EmbedResultSet.java:665)
... 14 more
>
The largest message in the 14 rows is 2702475 according to LENGTH(MESSAGE), so
even though ij is doing a getString() and materializing the CLOB I am surprised
it is running out of memory with a less than 3MB CLOB.
As an aside, for jdk 1.6 where it can call free, maybe it would make sense for
ij to do a getSubString on CLOBS for only the amount it plans to display
insted of a getString() to get the whole thing. I still don't think in this
case it should run out of memory with this size CLOB unless I have slipped a
digit which is not uncommon.
> java.lang.OutOfMemoryError from mailjdbc test after running for one hour from
> select * from REFRESH.INBOX
> ---------------------------------------------------------------------------------------------------------
>
> Key: DERBY-4294
> URL: https://issues.apache.org/jira/browse/DERBY-4294
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.3.3.0
> Environment: Window Vista
> Reporter: Lily Wei
> Attachments: Heapspaceerror.zip
>
>
> After running mailjdbc test on 10.3 branch, select * from REFRESH.INBOX gave
> me error like:
> ERROR XJ001: Java exception: 'Java heap space: java.lang.OutOfMemoryError'
> I also see the same error on 10.5 branch.
> I inculde my mailsdb directory in this bug too.
> How to reproduce this issue:
> 1. cd mailjdbc
> 2. java org.apache.derbyTesting.system.mailjdbc.MailJdbc embedded
> 3. Wait for an hour and ignore Primary key violation error
> ( : INFO :Refresh Thread : Error while inserting attachments:The statement
> was ab
> orted because it would have caused a duplicate key value in a unique or
> primary
> key constraint or unique index identified by 'ATTACH__PK' defined on
> 'ATTACH'.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.