Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5289

Unable to boot 10.5.1.1 database - fails during soft/hard upgrade process for a new version number while trying to drop jdbc metadata

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.3.0, 10.6.2.1, 10.7.1.1, 10.8.1.2, 10.9.1.0
    • SQL
    • None
    • Repro attached
    • Regression

    Description

      I have been unable to get Derby 10.7.1.1 and 10.8.1.2 to boot the attached 10.5.1.1 database. Derby 10.6.1.0 is however able to use the DB.

      I'm not sure if this is a backwards compatibility bug or the result of corruption to the database. Running SYSCS_CHECK_TABLE and SYSCS_COMPRESS_TABLE under 10.6.1.0 found no problems with the database.

      NOTE: I have had to remove all data and non-essential tables/columns/triggers/etc prior to attaching this database.

      Output when connecting to the DB using ij:
      ERROR XJ040: Failed to start database 'C:\Users\BMASON\Sandbox\InternalDB' with class loader sun.misc.Launcher$AppClassLoader@11b86e7, see the next exception for details.
      ERROR XSDA7: Restore of a serializable or SQLData object of class , attempted to read more data than was originally stored

      Full exception from our application:
      java.sql.SQLException: Failed to start database 'C:\Users\BMASON\Sandbox\InternalDB' with class loader sun.misc.Launcher$AppClassLoader@93dee9, see the next exception for details.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
      at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
      at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
      at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
      at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
      at com.ADInstruments.LTS.util.DerbyUtils.exists(DerbyUtils.java:86)
      at com.ADInstruments.LTS.InternalDB.InternalDbUtilities.cacheInternalDbVersion(InternalDbUtilities.java:117)
      at com.ADInstruments.LTCS.InternalDB.InternalDbStartup.initialiseDatabase(InternalDbStartup.java:23)
      at com.ADInstruments.LTCS.StartupTasks$StartupRunnable.initDatabases(StartupTasks.java:35)
      at com.ADInstruments.LTCS.StartupTasks$StartupRunnable.run(StartupTasks.java:52)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.sql.SQLException: Failed to start database 'C:\Users\BMASON\Sandbox\InternalDB' with class loader sun.misc.Launcher$AppClassLoader@93dee9, see the next exception for details.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
      ... 17 more
      Caused by: java.sql.SQLException: Restore of a serializable or SQLData object of class , attempted to read more data than was originally stored
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
      ... 14 more
      Caused by: ERROR XSDA7: Restore of a serializable or SQLData object of class , attempted to read more data than was originally stored
      at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
      at org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray(Unknown Source)
      at org.apache.derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot(Unknown Source)
      at org.apache.derby.impl.store.raw.data.BasePage.fetchFromSlot(Unknown Source)
      at org.apache.derby.impl.store.access.conglomerate.GenericScanController.fetchRows(Unknown Source)
      at org.apache.derby.impl.store.access.heap.HeapScan.fetchNext(Unknown Source)
      at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaHeap(Unknown Source)
      at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getAllSPSDescriptors(Unknown Source)
      at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropJDBCMetadataSPSes(Unknown Source)
      at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateMetadataSPSes(Unknown Source)
      at org.apache.derby.impl.sql.catalog.DD_Version.handleMinorRevisionChange(Unknown Source)
      at org.apache.derby.impl.sql.catalog.DD_Version.upgradeIfNeeded(Unknown Source)
      at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.loadDictionaryTables(Unknown Source)
      at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
      at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
      at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
      at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
      ... 14 more
      Caused by: java.io.EOFException
      at java.io.DataInputStream.readInt(DataInputStream.java:375)
      at org.apache.derby.iapi.sql.dictionary.TriggerDescriptor.readExternal(Unknown Source)
      at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source)
      at org.apache.derby.iapi.services.io.ArrayUtil.readArrayItems(Unknown Source)
      at org.apache.derby.impl.sql.execute.TriggerInfo.readExternal(Unknown Source)
      at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source)
      at org.apache.derby.impl.sql.execute.WriteCursorConstantAction.readExternal(Unknown Source)
      at org.apache.derby.impl.sql.execute.UpdateConstantAction.readExternal(Unknown Source)
      at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source)
      at org.apache.derby.impl.sql.GenericStorablePreparedStatement.readExternal(Unknown Source)
      at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source)
      at org.apache.derby.iapi.types.UserType.readExternal(Unknown Source)
      ... 39 more

      Attachments

        1. DERBY5269_patch1_diff.txt
          2 kB
          Mamta A. Satoor
        2. derby-5289_10_7_diff.txt
          12 kB
          Katherine Marsden
        3. derby-5289_test_diff.txt
          5 kB
          Katherine Marsden
        4. InternalDB - broken for 10.8.zip
          315 kB
          Brett Mason
        5. repro.sql
          0.5 kB
          Brett Mason

        Activity

          People

            kmarsden Katherine Marsden
            b.mason@adinstruments.com Brett Mason
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: