You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kristian Waagan (JIRA)" <ji...@apache.org> on 2011/08/25 22:28:30 UTC

[jira] [Created] (DERBY-5390) NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)

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

                 Key: DERBY-5390
                 URL: https://issues.apache.org/jira/browse/DERBY-5390
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.8.1.6, 10.9.0.0
            Reporter: Kristian Waagan
            Assignee: Kristian Waagan
            Priority: Minor


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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5390) NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-5390:
-----------------------------------

    Issue & fix info: [Patch Available]

> NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-5390
>                 URL: https://issues.apache.org/jira/browse/DERBY-5390
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.8.1.6, 10.9.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-5390-1a_check_for_null.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5390) NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091303#comment-13091303 ] 

Kristian Waagan commented on DERBY-5390:
----------------------------------------

The fix here is simple: check if the data dictionary is available.
I'm wonder why Throwable is caught though - why not catch only StandardException?

> NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-5390
>                 URL: https://issues.apache.org/jira/browse/DERBY-5390
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.8.1.6, 10.9.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5390) NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-5390:
-----------------------------------

    Attachment: derby-5390-1a_check_for_null.diff

Attaching patch 1a, which adds a check for null and catches only StandardException instead of Throwable.

> NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-5390
>                 URL: https://issues.apache.org/jira/browse/DERBY-5390
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.8.1.6, 10.9.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-5390-1a_check_for_null.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DERBY-5390) NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan closed DERBY-5390.
----------------------------------

          Resolution: Fixed
       Fix Version/s: 10.9.0.0
                      10.8.1.6
    Issue & fix info:   (was: [Patch Available])

Committed patch 1a to trunk with revision 1164358, and backported it to 10.8 with revision 1164359.

Closing issue.

> NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches)
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-5390
>                 URL: https://issues.apache.org/jira/browse/DERBY-5390
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.8.1.6, 10.9.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.8.1.6, 10.9.0.0
>
>         Attachments: derby-5390-1a_check_for_null.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira