db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6504) change AllocPage.ReadContainerInfo to catch ArrayIndexOutOfBoundsException and turn it into Derby error.
Date Thu, 29 May 2014 16:17:02 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14012487#comment-14012487

Myrna van Lunteren commented on DERBY-6504:

I'm trying to address the comments, but I am confused...
When I add the Exception, like so (see the arrow ==>):
		    try {
		        throw (new ArrayIndexOutOfBoundsException());
//		        System.arraycopy(
//						containerInfo, 0, N);
		    }  catch (ArrayIndexOutOfBoundsException ioobe) {
                throw StandardException.newException(
==>                  ioobe,
                        epage.length, containerInfo.length,
The output no longer reflects my new message...
I will investigate this further, perhaps it's hitting the error somewhere else, but this *is*
how it's supposed to look?

> change AllocPage.ReadContainerInfo to catch ArrayIndexOutOfBoundsException and turn it
into Derby error.
> --------------------------------------------------------------------------------------------------------
>                 Key: DERBY-6504
>                 URL: https://issues.apache.org/jira/browse/DERBY-6504
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions:,
>            Reporter: Mike Matrigali
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY-6504.diff
> Users have reported databases that will not boot with stack traces showing:
> Caused by: java.lang.ArrayIndexOutOfBoundsException
> at java.lang.System.arraycopy(Native Method)
> at org.apache.derby.impl.store.raw.data.AllocPage.ReadContainerInfo(Unknown Source)
> at org.apache.derby.impl.store.raw.data.FileContainer.readHeader(Unknown Source)
> I suggest the code be changed to catch the out of bounds and turn it
> into a StandardException and include as much runtime information as
> possible so that the underlying problem can be diagnosed.  Information
> should include sizes of both arrays, the amount of data being copied ("N"),
> and possibly a hex dump of the source array.

This message was sent by Atlassian JIRA

View raw message