Derby
  1. Derby
  2. DERBY-5390

NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.8.2.2, 10.9.1.0
    • Fix Version/s: 10.8.2.2, 10.9.1.0
    • Component/s: None
    • Labels:
      None

      Description

      To reproduce, set up a replication pair and then stop the master (I used "stopMaster=true").
      From derby.log on the slave:

      Replication slave role was stopped for database 'replicDB'.
      java.lang.NullPointerException
      at org.apache.derby.impl.db.BasicDatabase.stop(Unknown Source)
      at org.apache.derby.impl.db.SlaveDatabase.stop(SlaveDatabase.java:167)
      at org.apache.derby.impl.services.monitor.TopService.stop(TopService.java:443)
      at org.apache.derby.impl.services.monitor.TopService.shutdown(TopService.java:394)
      at org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(BaseMonitor.java:229)
      at org.apache.derby.impl.db.DatabaseContextImpl.cleanupOnError(DatabaseContextImpl.java:77)
      at org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(ContextManager.java:343)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.cleanupOnError(TransactionResourceImpl.java:437)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:339)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2290)
      at org.apache.derby.impl.jdbc.EmbedConnection.internalStopReplicationSlave(EmbedConnection.java:1034)
      at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:353)
      at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:73)
      at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(EmbedConnection40.java:51)
      at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.java:70)
      at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:248)
      at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:144)
      at org.apache.derby.impl.db.SlaveDatabase.handleShutdown(SlaveDatabase.java:428)
      at org.apache.derby.impl.db.SlaveDatabase.access$200(SlaveDatabase.java:72)
      at org.apache.derby.impl.db.SlaveDatabase$SlaveDatabaseBootThread.run(SlaveDatabase.java:328)
      at java.lang.Thread.run(Thread.java:722)

      The reason is that there is no data dictionary available when the database is in replication slave mode.
      Note that the exception is caught and simply printed to derby.log.

        Issue Links

          Activity

          Kristian Waagan created issue -
          Kristian Waagan made changes -
          Field Original Value New Value
          Attachment derby-5390-1a_check_for_null.diff [ 12492043 ]
          Kristian Waagan made changes -
          Issue & fix info [Patch Available]
          Kristian Waagan made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Issue & fix info [Patch Available]
          Fix Version/s 10.8.1.6 [ 12316676 ]
          Fix Version/s 10.9.0.0 [ 12316344 ]
          Resolution Fixed [ 1 ]
          Kristian Waagan made changes -
          Link This issue breaks DERBY-5398 [ DERBY-5398 ]
          Myrna van Lunteren made changes -
          Affects Version/s 10.8.2.0 [ 12317955 ]
          Affects Version/s 10.8.1.6 [ 12316676 ]
          Fix Version/s 10.8.2.0 [ 12317955 ]
          Fix Version/s 10.8.1.6 [ 12316676 ]
          Myrna van Lunteren made changes -
          Affects Version/s 10.8.2.2 [ 12317968 ]
          Affects Version/s 10.8.2.0 [ 12317955 ]
          Fix Version/s 10.8.2.2 [ 12317968 ]
          Fix Version/s 10.8.2.0 [ 12317955 ]
          Gavin made changes -
          Workflow jira [ 12628466 ] Default workflow, editable Closed status [ 12801228 ]

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development