Derby
  1. Derby
  2. DERBY-2783

corrupt metadata leads to null pointer exception when trying to build table descriptor.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.2.2.0
    • Fix Version/s: None
    • Component/s: SQL
    • Urgency:
      Normal

      Description

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mike Matrigali
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development