[Rxtx] port in use exception
Trent Jarvi
tjarvi at qbang.org
Mon Sep 25 00:14:35 MDT 2006
On Sun, 24 Sep 2006, Dr. Douglas Lyon wrote:
> Hi All,
> For the longest time, I was using RXTX to dial the phone.
> Recently, I switched to the PortIO device (USB to Serial converter).
>
> If I quit from the application and restart, I get an exception, as seen
> below, on the Mac. However, trying again seems to work fine.
> As long as the application remains open, everything works well.
>
> I do close the port when I am done.
> Hmm. I am using a odd-ball version of RXTX, as you can see.
> This could be the culprit. Any ideas?
> Thanks!
> - Doug
>
> Native lib Version = R-testing-XTX-2.1-7pre20noLock
> Java lib Version = R-testing-XTX-2.1-7pre20noLock
> trying to open:/dev/tty.usbserial
> gnu.io.PortInUseException: Unknown Application
> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:335)
> at serialPort.Utils.init(Utils.java:62)
> at serialPort.Utils.<init>(Utils.java:37)
> at serialPort.Utils.getSerialPortUtils(Utils.java:101)
> at gui.touchtone.DialUtils.doModemDial(DialUtils.java:70)
> at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141)
> at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:20)
> at addbk.JAddressBook.ViewPanel$11.run(ViewPanel.java:127)
> at gui.run.RunButton.actionPerformed(RunButton.java:45)
> at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
> at
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
> at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
> at
> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
> at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
> at
> java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
> at java.awt.Component.processMouseEvent(Component.java:5554)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
> at java.awt.Component.processEvent(Component.java:5319)
> at java.awt.Container.processEvent(Container.java:2010)
> at java.awt.Component.dispatchEventImpl(Component.java:4021)
> at java.awt.Container.dispatchEventImpl(Container.java:2068)
> at java.awt.Component.dispatchEvent(Component.java:3869)
> at
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
> at
> java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
> at java.awt.Container.dispatchEventImpl(Container.java:2054)
> at java.awt.Window.dispatchEventImpl(Window.java:1774)
> at java.awt.Component.dispatchEvent(Component.java:3869)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
> at
> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
hehe.. I remember making that oddball version for you :) Its not very
different from like releases at the time.
Perhaps you are trying to open the port before the kernel is ready? Are
you opening right after closing? The more recent versions of rxtx may
close the port faster which could make a difference depending how you are
using threads.
--
Trent Jarvi
tjarvi at qbang.org
More information about the Rxtx
mailing list