Occasional Java Comm PortInUseException

F

fred

Hi All,

I am seeing an occasional PortInUseException being thrown by some
driver code that uses the Java serial library. When thrown the
message displays that the port is in use by an unknown Windows
application. The port is definitely not being used by any other
application however. The problem occurs on about 1 out of every 3
reboots. Does anyone have any suggestions on how to solve this?

Thank you,
Fred
 
L

Lew

Hi All,

I am seeing an occasional PortInUseException being thrown by some
driver code that uses the Java serial library. When thrown the
message displays that the port is in use by an unknown Windows
application. The port is definitely not being used by any other
application however. The problem occurs on about 1 out of every 3
reboots. Does 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. What 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?
 
F

fred

Your assertion that "the port is definitely not being used by any other application" is suspect on the face of it.  What 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 youadvice.

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?

Note that it is a serial port I am talking about, not a network port.
 
L

Lew

fred said:
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 you spell things out in explicit detail and don't ignore requests for further information, like for an
http://sscce.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top