db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-2783) corrupt metadata leads to null pointer exception when trying to build table descriptor.
Date Thu, 07 Jun 2007 21:11:25 GMT
corrupt metadata leads to null pointer exception when trying to build table descriptor.
---------------------------------------------------------------------------------------

                 Key: DERBY-2783
                 URL: https://issues.apache.org/jira/browse/DERBY-2783
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.2.2.0
            Reporter: Mike Matrigali
            Priority: Minor


While trying to data mine a corrupted database got null pointer exceptions followed by RawStore
module error on all subsequent  calls.  I don't have the
database so the following description is just a guess at what is happening based on the provided
stack trace and looking at the code.

My guess is that the metadata is corrupted in some way such that an index to base table lookup
of the metadata does not find a row.  This would lead to 
the code in DataDictionaryImpl.getDescriptorViaIndex() maybe getting no rows back  from the
call to:
            {
                base_row_exists =
                    heapCC.fetch(
                        baseRowLocation, outRow.getRowArray(), (FormatableBitSet
) null);
            }

The current code does a bunch of checking in SANE code for base_row_exists, but does not check
at all in insane code.  The code should 
throw an exception if  base_row_exists is false.  

What I think is happening is that code then try's to initialize the descriptor based on a
row that never got read.  This eventually lead to 
a call to create a UUID based on a string which is null, and StringReader x = new StringReader(null);
results in a null pointer exception.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message