From derby-dev-return-56299-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Mon Mar 03 10:30:09 2008 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 36553 invoked from network); 3 Mar 2008 10:30:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2008 10:30:09 -0000 Received: (qmail 75183 invoked by uid 500); 3 Mar 2008 10:29:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 75159 invoked by uid 500); 3 Mar 2008 10:29:56 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 75034 invoked by uid 99); 3 Mar 2008 10:29:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 02:29:55 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 10:29:25 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C1E3E234C090 for ; Mon, 3 Mar 2008 02:28:50 -0800 (PST) Message-ID: <706938710.1204540130793.JavaMail.jira@brutus> Date: Mon, 3 Mar 2008 02:28:50 -0800 (PST) From: =?utf-8?Q?=C3=98ystein_Gr=C3=B8vlen_=28JIRA=29?= To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3454) 'java.lang.NullPointerException' is thrown when starting a master db before a slave one In-Reply-To: <515858619.1203765439969.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3454?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] =C3=98ystein Gr=C3=B8vlen updated DERBY-3454: ----------------------------------- Derby Info: (was: [Patch Available]) > 'java.lang.NullPointerException' is thrown when starting a master db befo= re 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 > 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 s= lave database socket, which is not available. > The exception is by the MasterController#startMaster(). First, it tries t= o setup connection with a slave database using a transmitter: > MasterController#setupConnection > -> transmitter =3D new ReplicationMessageTransmit();=20 > 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 propaga= ted back to the MasterController#startMaster() method. It's caught there an= d then a MasterController#teardownNetwork() method is called, which tries t= o send a STOP message using the aforementioned transmitter, which hasn't be= en able to init a connection.=20 > A transmitter simply tries to call socketConn.writeMessage(message), whic= h throws NPE because socketConn is null. > Thanks! --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.