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 "V.Narayanan (JIRA)" <ji...@apache.org> on 2008/04/07 11:08:24 UTC

[jira] Resolved: (DERBY-3454) 'java.lang.NullPointerException' is thrown when starting a master db before a slave one

     [ https://issues.apache.org/jira/browse/DERBY-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan resolved DERBY-3454.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0

All relevant patches have been submitted and committed.
Resolving issue!

> 'java.lang.NullPointerException' is thrown when starting a master db before a slave one
> ---------------------------------------------------------------------------------------
>
>                 Key: DERBY-3454
>                 URL: https://issues.apache.org/jira/browse/DERBY-3454
>             Project: Derby
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 10.4.0.0
>            Reporter: Serge Tsv
>            Assignee: V.Narayanan
>             Fix For: 10.4.0.0
>
>         Attachments: Derby3454.diff, Derby3454.stat
>
>
> The 'java.lang.NullPointerException' exception is thrown when a database is started in a master mode and is trying to establish a connection to an slave database socket, which is not available.
> The exception is by the MasterController#startMaster(). First, it tries to setup connection with a slave database using a transmitter:
>     MasterController#setupConnection
>        -> transmitter = new ReplicationMessageTransmit(); 
>             transmitter.initConnection()
>               -> new InetSocketAddress() -> createSocket() -> connect()
> The connect() method throws a ConnectException, and so fails to create a socketConn instance. The exception is then wrapped several times an propagated back to the MasterController#startMaster() method. It's caught there and then a MasterController#teardownNetwork() method is called, which tries to send a STOP message using the aforementioned transmitter, which hasn't been able to init a connection. 
> A transmitter simply tries to call socketConn.writeMessage(message), which throws NPE because socketConn is null.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.