Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5916 java.lang.NullPointerException org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop() connecting to network server
  3. DERBY-5922

BaseDataFileFactory.stop() should provide better protection for a null storageFactory. Can cause NullPointerException if boot fails

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 10.9.1.0
    • None
    • Store
    • None

    Description

      DERBY-5916 was a report of a NullPointerException in BaseDataFileFactory.stop()

      Although we don't know the root cause or have a reproduction of the problem reported in that issue. As Brian points out ..

      "It sounds like there was such a severe error trying to start up the database that
      we were trying to abort the startup and shutdown the parts that did start.

      But we were in a state where, having failed to start up, we couldn't shut down, either.

      BaseDataFileFactory.stop is very thorough with its null pointer checks, so it's not
      easy to see how that code could get a NPE.

      But I notice that line 532, the call to storageFactory.shutdown in this:

      if (isReadOnly()) // do enough to close all files, then return

      { storageFactory.shutdown(); return; }

      isn't protected by "if( storageFactory != null )"

      Perhaps you could reproduce this artificially by arranging by forcing
      the startup code to throw an exception at just the right point...
      "

      It would be good to fix at least the null checks. Perhaps the NullPointerException is masking the original error.

      Attachments

        Activity

          People

            mamtas Mamta A. Satoor
            kmarsden Katherine Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: