1. Derby
  2. DERBY-2783

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


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


      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.


        Mike Matrigali created issue -
        Mike Matrigali made changes -
        Field Original Value New Value
        Component/s SQL [ 11408 ]
        Rick Hillegas made changes -
        Urgency Normal
        Kathey Marsden made changes -
        Labels derby_triage10_5_2
        Gavin made changes -
        Workflow jira [ 12405801 ] Default workflow, editable Closed status [ 12799499 ]


          • Assignee:
            Mike Matrigali
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: