at org.smslib.threading.AServiceThread.run(AServiceThread.java:105)
SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways.
This software is distributed under the terms of the Apache v2.0 License.
Web Site: http://smslib.org
SMSLib API version: 3.5.3
SMSServer version: 3.5.3
[INFO ]2013-05-17 11:21:06,500 method:org.smslib.Service.listSystemInformation(Service.java:113)
SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways.
This software is distributed under the terms of the Apache v2.0 License.
Web Site: http://smslib.org
[INFO ]2013-05-17 11:21:06,500 method:org.smslib.Service.listSystemInformation(Service.java:114)
Version: 3.5.3
[INFO ]2013-05-17 11:21:06,500 method:org.smslib.Service.listSystemInformation(Service.java:115)
JRE Version: 1.6.0_26
[INFO ]2013-05-17 11:21:06,500 method:org.smslib.Service.listSystemInformation(Service.java:116)
JRE Impl Version: 20.1-b02
[INFO ]2013-05-17 11:21:06,500 method:org.smslib.Service.listSystemInformation(Service.java:117)
O/S: Windows XP / x86 / 5.1
run Start ...
smsserver.balancerRoundRobinLoadBalancer
[INFO ]2013-05-17 11:21:06,500 method:org.smslib.smsserver.SMSServer.loadConfiguration(SMSServer.java:166)
SMSServer: set balancer to: RoundRobinLoadBalancer
[INFO ]2013-05-17 11:21:06,515 method:org.smslib.smsserver.SMSServer.loadConfiguration(SMSServer.java:206)
SMSServer: added gateway modem1 / Default Serial Modem Gateway.
[INFO ]2013-05-17 11:21:06,531 method:org.smslib.smsserver.SMSServer.loadConfiguration(SMSServer.java:244)
SMSServer: added interface db1 / Default database interface. / INOUTBOUND
[INFO ]2013-05-17 11:21:06,718 method:org.smslib.smsserver.interfaces.Interface.start(Interface.java:290)
SMSServer: interface: org.smslib.smsserver.interfaces.Database started.
[INFO ]2013-05-17 11:21:06,718 method:org.smslib.queues.DefaultQueueManager.init(DefaultQueueManager.java:92)
Queue directory not defined. Queued messages will not be saved to filesystem.
[INFO ]2013-05-17 11:21:06,718 method:org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:188)
GTW: modem1: Starting gateway, using Wavecom (Generic) AT Handler.
[INFO ]2013-05-17 11:21:06,718 method:org.smslib.modem.SerialModemDriver.connectPort(SerialModemDriver.java:68)
GTW: modem1: Opening: COM10 @9600
[INFO ]2013-05-17 11:21:26,781 method:org.smslib.modem.AModemDriver.waitForNetworkRegistration(AModemDriver.java:462)
GTW: modem1: GSM: Invalid CREG response.
[INFO ]2013-05-17 11:21:26,781 method:org.smslib.modem.SerialModemDriver.disconnectPort(SerialModemDriver.java:120)
GTW: modem1: Closing: COM10 @9600
[INFO ]2013-05-17 11:21:27,921 method:org.smslib.modem.ModemGateway.stopGateway(ModemGateway.java:200)
GTW: modem1: Stopping gateway...
[ERROR]2013-05-17 11:21:27,921 method:org.smslib.smsserver.SMSServer.run(SMSServer.java:355)
SMSServer error!
java.io.IOException: write error
at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677)
at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38)
at org.smslib.modem.SerialModemDriver.write(SerialModemDriver.java:166)
at org.smslib.modem.AModemDriver.write(AModemDriver.java:302)
at org.smslib.modem.athandler.ATHandler_Wavecom.done(ATHandler_Wavecom.java:52)
at org.smslib.modem.ModemGateway.stopGateway(ModemGateway.java:201)
at org.smslib.Service.stopService(Service.java:355)
at org.smslib.Service.startService(Service.java:234)
at org.smslib.Service.startService(Service.java:196)
at org.smslib.smsserver.SMSServer.run(SMSServer.java:350)
at org.smslib.smsserver.SMSServer.main(SMSServer.java:589)
[INFO ]2013-05-17 11:21:27,921 method:org.smslib.smsserver.interfaces.Interface.stop(Interface.java:304)
SMSServer: interface: org.smslib.smsserver.interfaces.Database stopped.
[INFO ]2013-05-17 11:21:27,921 method:org.smslib.modem.ModemGateway.stopGateway(ModemGateway.java:200)
GTW: modem1: Stopping gateway...
[ERROR]2013-05-17 11:21:27,921 method:org.smslib.smsserver.SMSServer.main(SMSServer.java:595)
SMSServer Error:
java.io.IOException: write error
at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677)
at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38)
at org.smslib.modem.SerialModemDriver.write(SerialModemDriver.java:166)
at org.smslib.modem.AModemDriver.write(AModemDriver.java:302)
at org.smslib.modem.athandler.ATHandler_Wavecom.done(ATHandler_Wavecom.java:52)
at org.smslib.modem.ModemGateway.stopGateway(ModemGateway.java:201)
at org.smslib.Service.stopService(Service.java:355)
at org.smslib.smsserver.SMSServer.run(SMSServer.java:357)
at org.smslib.smsserver.SMSServer.main(SMSServer.java:589)
[INFO ]2013-05-17 11:21:27,921 method:org.smslib.modem.ModemGateway.stopGateway(ModemGateway.java:200)
GTW: modem1: Stopping gateway...
[ERROR]2013-05-17 11:21:27,921 method:org.smslib.smsserver.SMSServer.main(SMSServer.java:602)
SMSServer error while shutting down:
java.io.IOException: write error
at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677)
at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38)
at org.smslib.modem.SerialModemDriver.write(SerialModemDriver.java:166)
at org.smslib.modem.AModemDriver.write(AModemDriver.java:302)
at org.smslib.modem.athandler.ATHandler_Wavecom.done(ATHandler_Wavecom.java:52)
at org.smslib.modem.ModemGateway.stopGateway(ModemGateway.java:201)
at org.smslib.Service.stopService(Service.java:355)
at org.smslib.smsserver.SMSServer.main(SMSServer.java:598)
查找Service的startService方法发现:
/**
* Initializes and starts the SMSLib service. Depending on the parameter,
* all defined gateways can be requested to start or some may be allowed to
* fail. This should be the first call before you use the Service class for
* sending/receiving messages.
*
* @param startAllGateways
* True if all gateways should be started, False if some gateways
* are allowed to fail.
* @throws SMSLibException
* No Gateways are defined.
* @throws TimeoutException
* The gateway did not respond in a timely manner.
* @throws GatewayException
* A Gateway error occurred.
* @throws IOException
* An IO error occurred. 发生了一个IO错误
* @throws InterruptedException
* The call was interrupted. 呼叫中断
* @see #stopService()
*/
所以怀疑是否是因为链接不稳定??