Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 91040 invoked from network); 26 Jul 2005 23:05:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2005 23:05:40 -0000 Received: (qmail 61365 invoked by uid 500); 26 Jul 2005 23:05:37 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 61328 invoked by uid 500); 26 Jul 2005 23:05:36 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 61313 invoked by uid 99); 26 Jul 2005 23:05:36 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 16:05:24 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id C5DBAE0 for ; Wed, 27 Jul 2005 01:05:21 +0200 (CEST) Message-ID: <921599820.1122419121809.JavaMail.jira@ajax.apache.org> Date: Wed, 27 Jul 2005 01:05:21 +0200 (CEST) From: "John Sisson (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-728) Jetty gives misleading NPE on "port in use" condition In-Reply-To: <63960213.1120838169551.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/GERONIMO-728?page=comments#action_12316815 ] John Sisson commented on GERONIMO-728: -------------------------------------- Has been fixed in Jetty's CVS for the upcoming 5.1.5 release. https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1240821&group_id=7322 > Jetty gives misleading NPE on "port in use" condition > ----------------------------------------------------- > > Key: GERONIMO-728 > URL: http://issues.apache.org/jira/browse/GERONIMO-728 > Project: Geronimo > Type: Improvement > Components: web, dependencies > Versions: 1.0-M3, 1.0-M5, 1.0-M4 > Reporter: Aaron Mulder > Assignee: John Sisson > Fix For: 1.0-M5 > > When Jetty starts up but the port it wants is in use, you get an error like this: > 19 ERROR [GBeanInstance] Problem in doFail of geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=GBean,name=JettyWebConnector > java.lang.NullPointerException > at org.mortbay.util.ThreadedServer.stop(ThreadedServer.java:544) > at org.mortbay.http.SocketListener.stop(SocketListener.java:211) > at org.apache.geronimo.jetty.connector.JettyConnector.doFail(JettyConnector.java:102) > at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:869) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:328) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111) > at org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:486) > at org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart(GBeanSingleReference.java:154) > at org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBeanSingleReference.java:127) > at org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(AbstractGBeanReference.java:242) > at org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanSingleReference.java:163) > at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:155) > at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:38) > at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:231) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:352) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:133) > at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:503) > at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:207) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:141) > at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:503) > at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:207) > at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:247) > at org.apache.geronimo.system.main.Daemon.(Daemon.java:81) > at org.apache.geronimo.system.main.Daemon.main(Daemon.java:320) > Only later does the BindException show up, whereas I believe the BindException should be first (and in fact only -- what good does the NPE do?). > So what I think should happen is that we should trap a BindException, and if it comes up, don't try to stop the SocketListener (or at least don't generate another exception if it doesn't work). Then print an ERROR message including the port number (ERROR: Jetty unable to bind to port 8080). Then throw the BindException if the full stack trace would be useful. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira