------------------------------------------------ ----------------------<< #1 >>------------- #err multiple i think this problem when happend that put all Simple logging facade for Java (SLF4J) file in your class path,u must put together with one of the following files, depending on which logging system you use:
Logging System Required .jar JCL slf4j-jcl-1.5.8.jar Apache log4j slf4j-log4j12-1.5.8.jar JDK logging slf4j-jdk14-1.5.8.jar - download SLF4J version 1.5.8 from here http://www.slf4j.org/dist/slf4j-1.5.8.zip this setting work in my system: C:\Program Files\Java\jdk1.6.0_05\jre\lib\ext\slf4j-api-1.5.8.jar C:\Program Files\Java\jdk1.6.0_05\jre\lib\ext\slf4j-jdk14-1.5.8.jar ------------------------------------------------ ----------------------<< #2 >>------------- # err when the new message is received: probably your modem is not Compatible , - using SMSLib 3.4.4 and checked giving error yet put more information your GSM Modem for example: How Many SIM card slots IP Modem Serial Modem USB ,... On 11/18/09, Atul Kumar <[email protected]> wrote: > No comments on this till now, I think I am not been clear on this, let > me rephrase this for better understanding > > I am not able to recieve incoming messages through > InboundNotifications. While running the ReadMessages example, when the > new message is received, I get the following error and the program > exits - > > Nov 17, 2009 9:04:48 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: Interrupted! >> java.lang.InterruptedException: sleep interrupted >> at java.lang.Thread.sleep(Native Method) >> at org.smslib.threading.AServiceThread.run(AServiceThread.java: >> 121) >> >> I AM HERE >> Exception in thread "SMSLib-AsyncMessageProcessor : modem.com1" >> java.lang.String >> IndexOutOfBoundsException: String index out of range: -1 >> at java.lang.String.substring(Unknown Source) >> at org.smslib.modem.ModemGateway.readMessagesPDU >> (ModemGateway.java:494) >> at org.smslib.modem.ModemGateway.readMessages >> (ModemGateway.java:181) >> at org.smslib.modem.AModemDriver$AsyncMessageProcessor.run >> (AModemDriver. >> java:864) >> > > Please help on this > > On Nov 17, 8:48 pm, Atul Kumar <[email protected]> wrote: >> Hi >> >> I am using a Wavecom chipset based Maestro Heritage GSM modem. While >> running the ReadMessages.java example, I am able to succesfully read >> the messages that are already present in the "SM" memory. The examples >> also sets the InboundNotification. But while the application is >> running and a new message arrives, the application throws an >> exception. Below is the log of the application >> >> D:\jun-10\code\SMS_Lib\smslib-v3[1].4.2\dist\classes>java >> examples.modem.ReadMes >> sages >> Example: Read messages from a serial gsm modem. >> SMSLib: A Java API library for sending and receiving SMS via a GSM >> modem or othe >> r supported gateways. >> This software is distributed under the terms of the Apache v2.0 >> License. >> Web Site:http://smslib.org >> Version: 3.4.2 >> SLF4J: Class path contains multiple SLF4J bindings. >> SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ >> ext/slf4j-jc >> l-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] >> SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ >> ext/slf4j-jd >> k14-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] >> SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ >> ext/slf4j-lo >> g4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] >> SLF4J: Seehttp://www.slf4j.org/codes.html#multiple_bindingsfor an >> explanation. >> >> Nov 17, 2009 9:00:35 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Starting gateway, using Generic AT Handler. >> Nov 17, 2009 9:00:35 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Opening: COM1 @115200 >> Nov 17, 2009 9:00:42 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: GSM: Registered to home network. >> Nov 17, 2009 9:00:42 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: MEM: Storage Locations Found: SM >> OKMI =+CNMI: (0-3),(0-3),(0-3),(0-2),(0,1)>>> Gateway Status change for >> modem.com1, OLD: STOPPED -> NEW: STARTING >> >>> Gateway Status change for modem.com1, OLD: STARTING -> NEW: STARTED >> >> Nov 17, 2009 9:00:42 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Gateway started. >> >> Modem Information: >> Manufacturer: WAVECOM WIRELESS CPU >> Model: MULTIBAND 900E 1800 >> Serial No: 352238020010757 >> SIM IMSI: ** MASKED ** >> Signal Level: 100% >> Battery Level: 0% >> >> I AM HERE >> Now Sleeping - Hit <enter> to stop service. >> >> Nov 17, 2009 9:00:49 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Stopping gateway...>>> Gateway Status change for >> modem.com1, OLD: STARTED -> NEW: STOPPING >> >>> Gateway Status change for modem.com1, OLD: STOPPING -> NEW: STOPPED >> >> Nov 17, 2009 9:00:49 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Closing: COM1 @115200 >> Nov 17, 2009 9:00:49 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Gateway stopped. >> >> D:\jun-10\code\SMS_Lib\smslib-v3[1].4.2\dist\classes>java >> examples.modem.ReadMes >> sages >> Example: Read messages from a serial gsm modem. >> SMSLib: A Java API library for sending and receiving SMS via a GSM >> modem or othe >> r supported gateways. >> This software is distributed under the terms of the Apache v2.0 >> License. >> Web Site:http://smslib.org >> Version: 3.4.2 >> SLF4J: Class path contains multiple SLF4J bindings. >> SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ >> ext/slf4j-jc >> l-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] >> SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ >> ext/slf4j-jd >> k14-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] >> SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ >> ext/slf4j-lo >> g4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] >> SLF4J: Seehttp://www.slf4j.org/codes.html#multiple_bindingsfor an >> explanation. >> >> Nov 17, 2009 9:04:15 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Starting gateway, using Generic AT Handler. >> Nov 17, 2009 9:04:15 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Opening: COM1 @115200 >> Nov 17, 2009 9:04:15 PM org.slf4j.impl.JCLLoggerAdapter error >> SEVERE: GTW: modem.com1: Framing Error! >> Nov 17, 2009 9:04:22 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: GSM: Registered to home network. >> Nov 17, 2009 9:04:22 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: MEM: Storage Locations Found: SM >> OKMI =+CNMI: (0-3),(0-3),(0-3),(0-2),(0,1)>>> Gateway Status change for >> modem.com1, OLD: STOPPED -> NEW: STARTING >> >>> Gateway Status change for modem.com1, OLD: STARTING -> NEW: STARTED >> >> Nov 17, 2009 9:04:22 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: GTW: modem.com1: Gateway started. >> >> Modem Information: >> Manufacturer: WAVECOM WIRELESS CPU >> Model: MULTIBAND 900E 1800 >> Serial No: 352238020010757 >> SIM IMSI: ** MASKED ** >> Signal Level: 100% >> Battery Level: 0% >> >> I AM HERE >> memIndex is1 >> =============================================================================== >> << InboundMessage >> >> ------------------------------------------------------------------------------- >> Gateway Id: modem.com1 >> Encoding: 7-bit >> Date: Tue Nov 17 20:39:36 IST 2009 >> Dispatched via SMSC: 919814047105 >> Text: B >> PDU data: 42 >> Originator: 919814012345 >> Memory Index: 1 >> Multi-part Memory Index: >> Memory Location: SM >> Source / Destination Ports: -1 / -1 >> =============================================================================== >> >> Now Sleeping - Hit <enter> to stop service. >> Nov 17, 2009 9:04:48 PM org.slf4j.impl.JCLLoggerAdapter info >> INFO: Interrupted! >> java.lang.InterruptedException: sleep interrupted >> at java.lang.Thread.sleep(Native Method) >> at org.smslib.threading.AServiceThread.run(AServiceThread.java: >> 121) >> >> I AM HERE >> Exception in thread "SMSLib-AsyncMessageProcessor : modem.com1" >> java.lang.String >> IndexOutOfBoundsException: String index out of range: -1 >> at java.lang.String.substring(Unknown Source) >> at org.smslib.modem.ModemGateway.readMessagesPDU >> (ModemGateway.java:494) >> at org.smslib.modem.ModemGateway.readMessages >> (ModemGateway.java:181) >> at org.smslib.modem.AModemDriver$AsyncMessageProcessor.run >> (AModemDriver. >> java:864) >> >> Are the callback notifications not been set properly? >> >> Thanks in advance >> Atul > > -- > > You received this message because you are subscribed to the Google Groups > "SMSLib for Java User Group" group. > To post to this group, send email to [email protected]. > For more options, visit this group at > http://groups.google.com/group/smslib?hl=. > > > -- You received this message because you are subscribed to the Google Groups "SMSLib for Java User Group" group. To post to this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/smslib?hl=.
