Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!news2.arglkargh.de!easy.in-chemnitz.de!feeder.news-service.com!postnews.google.com!h23g2000pra.googlegroups.com!not-for-mail From: fred Newsgroups: comp.lang.java.programmer Subject: Re: Occasional Java Comm PortInUseException Date: Mon, 29 Aug 2011 08:27:22 -0700 (PDT) Organization: http://groups.google.com Lines: 29 Message-ID: <799a43e9-bb1c-4a67-b8ce-77f8a5514691@h23g2000pra.googlegroups.com> References: <52fe615c-e7d5-4c06-ba6c-7d91c84f49b2@t20g2000prf.googlegroups.com> <4ba207f9-126e-44bd-8392-60b9b378e74c@glegroupsg2000goo.googlegroups.com> NNTP-Posting-Host: 76.103.116.43 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1314632488 29269 127.0.0.1 (29 Aug 2011 15:41:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 Aug 2011 15:41:28 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h23g2000pra.googlegroups.com; posting-host=76.103.116.43; posting-account=MjLUdQoAAACEt1kTc3CRnD0cw2a2JXIv User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7469 On Aug 28, 1:24=A0pm, Lew wrote: > On Sunday, August 28, 2011 12:55:18 PM UTC-7, fred wrote: > > Hi All, > > > 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 a= pplication" is suspect on the face of it. =A0What makes you so damn certain= , especially in the face of that error message? > > You also don't quote the error message, which makes it harder to give you= 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/ > > What does netstat tell you at the time of the error? > > -- > Lew Note that it is a serial port I am talking about, not a network port.