Are you using the latest version?
This issue existed at some time, but it's supposed to be fixed lately.

On 19 March 2010 00:55, diffa <[email protected]> wrote:

>
> I added a System.in.read() between the stop and the (re)start and
> waited ~30s.  Same error though.  In debug, it seems to be calling
> disconnect on the SerialPort object - something must be hanging around
> though.
>
> I have the Service object running as an OSGi service which is why I
> want to be able to stop/start without killing the VM.
>
> Chris
>
> On Mar 18, 6:59 pm, Thanasis <[email protected]> wrote:
> > Hi,
> >
> > Can you try to add an artificial 5 or 10 seconds delay between stop and
> > start and check if this happens again?
> >
> > On 18 March 2010 19:10, diffa <[email protected]> wrote:
> >
> >
> >
> > > Hi,
> >
> > > I am having a problem where I cannot seem to successfully stop and
> > > start the SMSLib service without error, it seems as though even after
> > > Service.stopService is called it is still holding on to the COM port.
> >
> > > I have updated the SendMessage example (http://gist.github.com/336566)
> > > to verify the issue is not with my code.  I can start the service,
> > > send a message, stop the service with no problems.  If I then start
> > > the service once more within the same java process, I get the
> > > following message:
> >
> > > org.smslib.GatewayException: Comm library exception:
> > > java.lang.RuntimeException: javax.comm.PortInUseException: Port
> > > currently owned by Unknown Windows Application
> > >        at
> > > org.smslib.modem.SerialModemDriver.connectPort(SerialModemDriver.java:
> > > 96)
> > >        at org.smslib.modem.AModemDriver.connect(AModemDriver.java:111)
> > >        at
> org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:186)
> > >        at org.smslib.Service$1Starter.run(Service.java:257)
> >
> > > If I let that process complete and run it again it will work.  Am I
> > > missing something necessary to relinquish the port once the service
> > > has stopped?
> >
> > > Kind regards,
> >
> > > Chris
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "SMSLib User Group" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<smslib%[email protected]>
> <smslib%[email protected]<smslib%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/smslib?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "SMSLib User Group" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<smslib%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/smslib?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib User Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/smslib?hl=en.

Reply via email to