[ http://issues.apache.org/jira/browse/DERBY-1497?page=all ] Andreas Korneliussen closed DERBY-1497: ---------------------------------------
> assert failure in MessageUtil, because exception thrown with too many > parameters when handling OutOfMemoryError > --------------------------------------------------------------------------------------------------------------- > > Key: DERBY-1497 > URL: http://issues.apache.org/jira/browse/DERBY-1497 > Project: Derby > Type: Sub-task > Components: Network Client > Versions: 10.2.0.0 > Reporter: Andreas Korneliussen > Assignee: Andreas Korneliussen > Priority: Trivial > Fix For: 10.2.0.0 > Attachments: DERBY-1497.diff, DERBY-1497v2.diff > > If the VM throws a OutOfMemoryException, which is caught in: > NetStatementReply.copyEXTDTA: > protected void copyEXTDTA(NetCursor netCursor) throws DisconnectException > { > try { > parseLengthAndMatchCodePoint(CodePoint.EXTDTA); > byte[] data = null; > if (longValueForDecryption_ == null) { > data = (getData(null)).toByteArray(); > } else { > data = longValueForDecryption_; > dssLength_ = 0; > longValueForDecryption_ = null; > } > netCursor.extdtaData_.add(data); > } catch (java.lang.OutOfMemoryError e) { <--- outofmemory > agent_.accumulateChainBreakingReadExceptionAndThrow(new > DisconnectException(agent_, > new ClientMessageId(SQLState.NET_LOB_DATA_TOO_LARGE_FOR_JVM), > e)); <----- message does not take parameters, causing assert > failure > } > } > Instead of getting the message: java.sql.SQLException: Attempt to fully > materialize lob data that is too large for the JVM. The connection has been > terminated. > I am getting an assert: > Exception in thread "main" > org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED Number of > parameters expected for message id 58009.C.6 (0) does not match number of > arguments received (1) > at > org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:119) > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira