Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Occasional Java Comm PortInUseException Date: Mon, 29 Aug 2011 09:01:08 -0700 (PDT) Organization: http://groups.google.com Lines: 37 Message-ID: References: <52fe615c-e7d5-4c06-ba6c-7d91c84f49b2@t20g2000prf.googlegroups.com> <4ba207f9-126e-44bd-8392-60b9b378e74c@glegroupsg2000goo.googlegroups.com> <799a43e9-bb1c-4a67-b8ce-77f8a5514691@h23g2000pra.googlegroups.com> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 108.89.33.208 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1314633669 9626 127.0.0.1 (29 Aug 2011 16:01:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 Aug 2011 16:01:09 +0000 (UTC) In-Reply-To: <799a43e9-bb1c-4a67-b8ce-77f8a5514691@h23g2000pra.googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.89.33.208; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7470 fred wrote: >Lew wrote: >> fred wrote: >>> I am seeing an occasional PortInUseException being thrown by some >>> driver code that uses the Java serial library. =A0When thrown the >>> message displays that the port is in use by an unknown Windows >>> application. =A0The port is definitely not being used by any other >>> application however. =A0The problem occurs on about 1 out of every 3 >>> reboots. =A0Does anyone have any suggestions on how to solve this? >> >> Your assertion that "the port is definitely not being used by any other = application" is suspect on the face of it. =A0What makes you so damn certai= n, especially in the face of that error message? >> >> You also don't quote the error message, which makes it harder to give yo= u advice. >> >> You might have a port in a TIME_WAIT state, or some other hidden problem= that looks like the port is in use to your code >> >> Speaking of which, what is your code? >> http://sscce.org/=20 >> What does netstat tell you at the time of the error? >=20 > Note that it is a serial port I am talking about, not a network port. Well, that's an important point. What about that SSCCE? You have to give enough information for someone to help you. It helps if y= ou spell things out in explicit detail and don't ignore requests for furthe= r information, like for an=20 http://sscce.org/=20 --=20 Lew