db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5931) NPE when connecting(starting) a database in master replication mode
Date Fri, 06 Sep 2013 09:17:53 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13760080#comment-13760080
] 

Dag H. Wanvik commented on DERBY-5931:
--------------------------------------

In MasterController#startMaster, we have these two calls:

logFactory.startReplicationMasterRole(this)
:
if ((replicationMode.equals(MasterFactory.ASYNCHRONOUS_MODE)) {
                logShipper = new AsynchronousLogShipper(logBuffer,
                                                        transmitter,
                                                        this,
                                                        repLogger);

Now, the NPE seen in MasterCOntroller#flushedTo can only mean that logShipper is null. But
then again, the attempt to call flushedTo
can only happen after the call to startReplicationMasterRole which sets the boolean inReplicationMasterMode.

So, perhaps there is a window here between the call to startReplicationMasterRole and the
initialization of logShipper in which logging can happen,


                
> NPE when connecting(starting) a database in master replication mode
> -------------------------------------------------------------------
>
>                 Key: DERBY-5931
>                 URL: https://issues.apache.org/jira/browse/DERBY-5931
>             Project: Derby
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 10.5.3.0
>         Environment: Windows XP
>            Reporter: Glenn McGregor
>              Labels: derby_triage10_11, replication
>
> java.lang.NullPointerException
> 	at org.apache.derby.impl.store.replication.master.MasterController.flushedTo(Unknown
Source)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.flush(Unknown Source)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.flush(Unknown Source)
> 	at org.apache.derby.impl.store.raw.log.FileLogger.flush(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.Xact.prepareCommit(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.Xact.commit(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.Xact.commit(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.commit(Unknown Source)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.doCommit(Unknown
Source)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.userCommit(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.commit(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.commit(Unknown Source)
> 	at org.apache.derby.impl.drda.Database.commit(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> ------------  BEGIN SHUTDOWN ERROR STACK -------------
> ERROR XSTB0: An exception was thrown during transaction abort.
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.Xact.preComplete(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.Xact.abort(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.XactContext.cleanupOnError(Unknown Source)
> 	at org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(Unknown Source)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.cleanupOnError(Unknown Source)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.commit(Unknown Source)
> 	at org.apache.derby.impl.drda.Database.commit(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> Connection URL: 
> jdbc:derby://127.0.0.1:1527/provision;user=aaadbr;password=XXXXXXXX;startMaster=true;slaveHost=135.244.44.80;slavePort=4851

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message