猫池smslib异常

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:02:30,515 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:02:30,515 method:org.smslib.Service.listSystemInformation(Service.java:114)
Version: 3.5.3
[INFO ]2013-05-17 11:02:30,515 method:org.smslib.Service.listSystemInformation(Service.java:115)
JRE Version: 1.6.0_26
[INFO ]2013-05-17 11:02:30,515 method:org.smslib.Service.listSystemInformation(Service.java:116)
JRE Impl Version: 20.1-b02
[INFO ]2013-05-17 11:02:30,515 method:org.smslib.Service.listSystemInformation(Service.java:117)
O/S: Windows XP / x86 / 5.1


 run Start ... 


smsserver.balancerRoundRobinLoadBalancer
[INFO ]2013-05-17 11:02:30,531 method:org.smslib.smsserver.SMSServer.loadConfiguration(SMSServer.java:166)
SMSServer: set balancer to: RoundRobinLoadBalancer
[INFO ]2013-05-17 11:02:30,546 method:org.smslib.smsserver.SMSServer.loadConfiguration(SMSServer.java:206)
SMSServer: added gateway modem1 / Default Serial Modem Gateway.
[INFO ]2013-05-17 11:02:30,546 method:org.smslib.smsserver.SMSServer.loadConfiguration(SMSServer.java:244)
SMSServer: added interface db1 / Default database interface. / INOUTBOUND
[INFO ]2013-05-17 11:02:30,796 method:org.smslib.smsserver.interfaces.Interface.start(Interface.java:290)
SMSServer: interface: org.smslib.smsserver.interfaces.Database started.
[INFO ]2013-05-17 11:02:33,781 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:02:38,750 method:org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:188)
GTW: modem1: Starting gateway, using Wavecom (Generic) AT Handler.
[INFO ]2013-05-17 11:02:38,750 method:org.smslib.modem.SerialModemDriver.connectPort(SerialModemDriver.java:68)
GTW: modem1: Opening: COM10 @9600
[INFO ]2013-05-17 11:03:17,031 method:org.smslib.modem.AModemDriver.waitForNetworkRegistration(AModemDriver.java:459)
GTW: modem1: GSM: Registered to foreign network (roaming).
[INFO ]2013-05-17 11:03:17,281 method:org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:190)
GTW: modem1: Signal level/bit error rate: +CSQ: 99,99
OK


[INFO ]2013-05-17 11:03:17,359 method:org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:191)
GTW: modem1: Network registration: +CREG: 5
+CREG: 1,5
OK


[INFO ]2013-05-17 11:03:17,421 method:org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:192)
GTW: modem1: Network operator: +COPS: 0,2,46000
OK


[INFO ]2013-05-17 11:03:17,437 method:org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:194)
GTW: modem1: Gateway started.
[INFO ]2013-05-17 11:03:25,843 method:org.smslib.smsserver.SMSServer.sendMessages(SMSServer.java:414)
SMSServer: sending synchronously...
[WARN ]2013-05-17 11:03:53,875 method:org.smslib.modem.athandler.ATHandler.sendMessage(ATHandler.java:360)
GTW: modem1: CMS Error 513: Retrying...
[WARN ]2013-05-17 11:04:01,812 method:org.smslib.modem.AModemDriver$CharQueue.peek(AModemDriver.java:566)
GTW: modem1: Ignoring InterruptedException in Queue.peek().
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at org.smslib.modem.AModemDriver$CharQueue.peek(AModemDriver.java:560)
at org.smslib.modem.AModemDriver.getResponse(AModemDriver.java:332)
at org.smslib.modem.AModemDriver.getResponse(AModemDriver.java:313)
at org.smslib.modem.athandler.ATHandler.isAlive(ATHandler.java:136)
at org.smslib.modem.AModemDriver$KeepAlive.process(AModemDriver.java:682)

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()
*/

所以怀疑是否是因为链接不稳定??

你可能感兴趣的:(异常,SMSLib,猫池)