Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 5977 invoked from network); 24 Dec 2008 16:05:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Dec 2008 16:05:12 -0000 Received: (qmail 8488 invoked by uid 500); 24 Dec 2008 16:05:12 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 8286 invoked by uid 500); 24 Dec 2008 16:05:11 -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 8277 invoked by uid 99); 24 Dec 2008 16:05:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Dec 2008 08:05:11 -0800 X-ASF-Spam-Status: No, hits=-1999.8 required=10.0 tests=ALL_TRUSTED,WHOIS_MYPRIVREG 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; Wed, 24 Dec 2008 16:05:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7EE7D234C468 for ; Wed, 24 Dec 2008 08:04:44 -0800 (PST) Message-ID: <440743995.1230134684518.JavaMail.jira@brutus> Date: Wed, 24 Dec 2008 08:04:44 -0800 (PST) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-1465) NetworkServerControl.start() should throw an exception and not just print exceptions if the server fails to start In-Reply-To: <20510964.1151587050017.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659110#action_12659110 ] Knut Anders Hatlen commented on DERBY-1465: ------------------------------------------- Right, I assumed that the BindException was in the exception chain, but I see now that that's not the case. If we just want to preserve the exception in case it's an unexpected one in the test, we could simply do this and ignore that we don't really have a BindException in the chain: catch (Exception e) { if (e.getMessage().indexOf("java.net.BindException") == -1) { throw e; } } As to the issue of preserving the original exception when a BindException (or any other exception) is thrown, I think the problem here is that consolePropertyMessage() only takes the message to print as an argument. Since it in many cases generates and throws a new exception, it should also take the underlying exception as an argument, and it should either re-throw it or put it in the chain with initCause() so that we preserve the stack trace of the root cause. It doesn't have to be fixed as part of this issue, but I think it would be worth fixing. > NetworkServerControl.start() should throw an exception and not just print exceptions if the server fails to start > -------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-1465 > URL: https://issues.apache.org/jira/browse/DERBY-1465 > Project: Derby > Issue Type: Bug > Components: Network Server > Affects Versions: 10.1.2.1 > Reporter: Kathey Marsden > Priority: Minor > Attachments: DERBY-1465.diff3, DERBY-1465.diff4, DERBY-1465.diff5, DERBY-1465.diff6, DERBY-1465.diff7, DERBY-1465_diff.txt, DERBY-1465_diff.txt, DERBY-1465_stat.txt, DERBY-1465_stat.txt, releaseNote.html, releaseNote.html, releaseNote.html > > > NetworkServerControl.start() will not throw an exception if another server is already running on the same port. I am not sure but think perhaps this was changed at one point to accomodate the derby.drda.startNetworkServer property so that the embedded server could continue to boot even if the network server failed to start, but I think this is wrong for normal usage. > http://www.nabble.com/Questions-about-Network-Server-API-Behavior-p5055814.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.