Good!!!!

2013/1/31 shakir pm via SMSLib Discussion Group <
smslib+noreply-apn2wqfanf8m78b_frmd9bkbdz9dr_egob5xbgq6tyv4l-...@googlegroups.com
>

> Working fine now.  I included comm.jar in runtime instaed copying to the
> jre folders
>
>
> Thanks
>
> On Thursday, January 31, 2013 12:01:12 PM UTC+5:30, zebel wrote:
>
>> Morning,
>> Why don't you convert this smsLib src into a jar file. Add this file to
>> your web app and call it from wherever passing respective parameters.
>> Regards
>>
>> 2013/1/30 shakir pm via SMSLib Discussion Group <smslib+noreply-**
>> APn2wQfANf8m78B_fRmD9bkBdZ9DR_**egoB5xBGQ6TyV4L-LaM@**googlegroups.com>
>>
>>> Hi ,
>>>
>>> I am able to send SMS using sendMessage.java (This is running as
>>> standalone application. Same code in SMSLib src).
>>>
>>> But i want this as WAR file deployed in Jboss 7.
>>>
>>> So i wrote the similar code in a servelet and deployed. But getting
>>> error when starting the service "Caused by: java.lang.RuntimeException:
>>> CommPortIdentifier class not found"...
>>>
>>> Please help me on this. I want this SMS lib to run as a webaplication
>>> and shuold be able to send/recieve SMS through ULR hits.
>>>
>>>
>>> Here is my servlet......
>>>
>>>
>>> package com.hp.servlet;
>>>
>>> import java.io.IOException;
>>> import java.util.List;
>>> import javax.servlet.**ServletException;
>>> import javax.servlet.http.**HttpServlet;
>>> import javax.servlet.http.**HttpServletRequest;
>>> import javax.servlet.http.**HttpServletResponse;
>>> import org.smslib.AGateway.Protocols;
>>> import org.smslib.InboundMessage;
>>> import org.smslib.Service;
>>> import org.smslib.modem.**SerialModemGateway;
>>>
>>>
>>>
>>>
>>> public class startService extends HttpServlet {
>>>
>>>     public startService() {
>>>         super();
>>>
>>>     }
>>>
>>>     protected void doGet(HttpServletRequest request,
>>>             HttpServletResponse response) throws ServletException,
>>> IOException {
>>>
>>>         doPost(request, response);
>>>     }
>>>
>>>     protected void doPost(HttpServletRequest request,
>>>             HttpServletResponse response) throws ServletException,
>>> IOException {
>>>
>>>         System.out.println("Starting Service");
>>>
>>>
>>>         OutboundNotification outboundNotification = new
>>> OutboundNotification();
>>>         SerialModemGateway gateway = new SerialModemGateway("modem.**com22",
>>> "COM6", 115200, "huawei", "E1750");
>>>
>>>         try {
>>>             gateway.setProtocol(Protocols.**PDU);
>>>             gateway.setInbound(true);
>>>             gateway.setOutbound(true);
>>>             gateway.setSimPin("0000");
>>>             gateway.setSmscNumber("+**919845087001");
>>>             Service.getInstance().**setOutboundMessageNotification**
>>> (outboundNotification);
>>>             Service.getInstance().**addGateway(gateway);
>>>             System.out.println("Gateway Added");
>>>             Service.getInstance().**startService();
>>>
>>>             System.out.println("Service Started");
>>>         }
>>>         catch (Exception e) {
>>>             System.out.println(e);
>>>         }
>>>
>>>
>>>         }
>>>
>>>     }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Error in log.
>>> ---------------------
>>>
>>> 10:03:57,853 INFO  [stdout] (http-localhost-127.0.0.1-**8080-1)
>>> Starting Service
>>>
>>> 10:03:57,854 INFO  [smslib] (http-localhost-127.0.0.1-**8080-1) 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
>>> 10:03:57,854 INFO  [smslib] (http-localhost-127.0.0.1-**8080-1)
>>> Version: 3.5.2
>>> 10:03:57,854 INFO  [smslib] (http-localhost-127.0.0.1-**8080-1) JRE
>>> Version: 1.6.0_31
>>> 10:03:57,854 INFO  [smslib] (http-localhost-127.0.0.1-**8080-1) JRE
>>> Impl Version: 20.6-b01
>>> 10:03:57,869 INFO  [smslib] (http-localhost-127.0.0.1-**8080-1) O/S:
>>> Windows 7 / x86 / 6.1
>>> 10:03:57,885 INFO  [stdout] (http-localhost-127.0.0.1-**8080-1) Gateway
>>> Added
>>>
>>> 10:03:57,885 INFO  [smslib] (http-localhost-127.0.0.1-**8080-1) Queue
>>> directory not defined. Queued messages will not be saved to filesystem.
>>> 10:03:57,885 INFO  [smslib] (Thread-87) GTW: modem.com22: Starting
>>> gateway, using Generic AT Handler.
>>> 10:03:57,885 INFO  [smslib] (Thread-87) GTW: modem.com22: Opening: COM6
>>> @115200
>>> 10:03:57,885 ERROR [stderr] (Thread-87) Exception in thread "Thread-87"
>>> java.lang.**ExceptionInInitializerError
>>>
>>> 10:03:57,885 ERROR [stderr] (Thread-87)     at org.smslib.modem.**
>>> SerialModemDriver.connectPort(**SerialModemDriver.java:69)
>>>
>>> 10:03:57,901 ERROR [stderr] (Thread-87)     at
>>> org.smslib.modem.AModemDriver.**connect(AModemDriver.java:114)
>>>
>>> 10:03:57,901 ERROR [stderr] (Thread-87)     at
>>> org.smslib.modem.ModemGateway.**startGateway(ModemGateway.**java:189)
>>>
>>> 10:03:57,901 ERROR [stderr] (Thread-87)     at
>>> org.smslib.Service$1Starter.**run(Service.java:276)
>>>
>>> 10:03:57,901 ERROR [stderr] (Thread-87) Caused by:
>>> java.lang.RuntimeException: CommPortIdentifier class not found
>>>
>>> 10:03:57,901 ERROR [stderr] (Thread-87)     at org.smslib.helper.**
>>> CommPortIdentifier.<clinit>(**CommPortIdentifier.java:76)
>>>
>>> 10:03:57,901 ERROR [stderr] (Thread-87)     ... 4 more
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "SMSLib Discussion Group" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to smslib+un...@**googlegroups.com.
>>> To post to this group, send email to [email protected].
>>>
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/smslib/-/VfAufGLhwowJ<https://groups.google.com/d/msg/smslib/-/VfAufGLhwowJ>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "SMSLib Discussion Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msg/smslib/-/2uIaPhBHt78J.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to