Code Monkey home page Code Monkey logo

jsmpp's People

jsmpp's Issues

sending multi unicode messages by using esm

i am trying to implement multi uncicode messages through esm. but in case 
of unicode characters it is not working. can you please recommend a way to 
send multi unicode message through esm?.

sending of normal multi messages is successful but ucs2 /unicode messages 
is not successful.


Original issue reported on code.google.com by waseem%[email protected] on 19 May 2009 at 10:45

DefaultComposer.submitMultiResp() should check for null UnsuccessDelivery param

What steps will reproduce the problem?
1. Assume all the messages are delivered
2. From Server Simulator, on onAcceptSubmitMulti(), you return 
UnsuccessDelivery as null as param

like new SubmitMultiResult(messageId.getValue(), null);

You get null pointer exception

What is the expected output? What do you see instead?

Response should be sent back

Here is stacktrace
5345 [pool-3-thread-2] DEBUG org.jsmpp.session.AbstractSessionContext  - 
Activity notified
Exception in thread "pool-3-thread-2" java.lang.NullPointerException
5657 [pool-3-thread-2] DEBUG org.jsmpp.examples.SMPPServerSimulator  - 
Receiving submit_multi_sm {}, and return message id {}
    at 
org.jsmpp.util.DefaultComposer.submitMultiResp(DefaultComposer.java:556)
    at 
org.jsmpp.DefaultPDUSender.sendSubmitMultiResp(DefaultPDUSender.java:399)
5657 [pool-3-thread-2] DEBUG 
org.jsmpp.session.state.SMPPServerSessionBoundTX  - Sending response with 
message_id 6659a3a8 for request with sequence_number 2
    at 
org.jsmpp.SynchronizedPDUSender.sendSubmitMultiResp(SynchronizedPDUSender.j
ava:388)
    at 
org.jsmpp.session.SMPPServerSession$ResponseHandlerImpl.sendSubmitMultiResp
onse(SMPPServerSession.java:383)
    at 
org.jsmpp.session.state.SMPPServerSessionBoundTX.processSubmitMulti(SMPPSer
verSessionBoundTX.java:76)
    at 
org.jsmpp.session.PDUProcessServerTask.run(PDUProcessServerTask.java:75)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j
ava:885)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
907)
    at java.lang.Thread.run(Thread.java:619)

Original issue reported on code.google.com by [email protected] on 10 Aug 2009 at 10:55

ProcessRequestException thrown for a deliver_sm msg, generates an invalid deliver_sm_resp

What steps will reproduce the problem?
1. throw a ProcessRequestException in the onAcceptDeliverSm handler
2. generated deliver_sm_resp does not have a null message_id octet. 

What is the expected output? What do you see instead?
SMPPSim capture of the generated deliver_sm_resp
2009.04.08 10:03:30 453 INFO    12 : DELIVER_SM_RESP:
2009.04.08 10:03:30 453 INFO    12 Hex dump (16) bytes:
2009.04.08 10:03:30 453 INFO    12 00000010:80000005:00000064:00000003:
SMPPSim generates an exception on this message because the PDU size is
expected to be 17 with the included null message_id byte.
Per the SMPPv34 spec, it should look like:
00000011:80000005:00000064:00000003:00


What version of the product are you using? On what operating system?
jsmpp-2.0.1 on Redhat Linux ES release 4

Please provide any additional information below.
An exception thrown while processing the deliver_sm in
SMPPSessionBoundRX.processDeliverSm0 results in a call to
sendNegativeResponse.  SMPPSession.sendNegativeResponse only generates a
call to PDUSender.sendHeader, so any negative responses that include more
fields than just header fields will not be complete.
sendNegativeResponse should likely use the originalCommandId parameter to
determine the appropriate negative response format.

Original issue reported on code.google.com by [email protected] on 8 Apr 2009 at 6:08

NullPointerException when sending an SMS from a Servlet.

I'm trying to execute the SimpleSubmitExample code from within a Servlet,
and get the following excetion: 

java.lang.NullPointerException
        at org.jsmpp.DefaultPDUSender.sendSubmitSm(DefaultPDUSender.java:196)
        at
org.jsmpp.SynchronizedPDUSender.sendSubmitSm(SynchronizedPDUSender.java:192)
        at
org.jsmpp.session.SubmitSmCommandTask.executeTask(SubmitSmCommandTask.java:86)
        at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:248)
        at
org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:318)
        at
com.deimos.opentcp.server.sms.sender.SMSSenderServlet.processRequest(SMSSenderSe
rvlet.java:96)
        at
com.deimos.opentcp.server.sms.sender.SMSSenderServlet.doGet(SMSSenderServlet.jav
a:139)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
        at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.jav
a:390)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
33)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
91)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

The example works fine executing as a standalone application, but in this
case within a Servlet it fails, I don't know why. 

Have you tested the API in a servlet environment? Is there something I must
take into account? 

Thanks in advance. 

--
Félix.

Original issue reported on code.google.com by felix.pedrera on 21 Jan 2009 at 8:14

Attachments:

How to set global-sender

I had been using Kannel for SMS application. Kannel exposes one parameter
'global-sender' this parameter is used to set sender id in SMS message.
This parameter value is displayed as the from id in the message received on
the mobile.

How to set this variable in jsmpp.


Original issue reported on code.google.com by [email protected] on 28 Jan 2009 at 6:09

NullPointerException in Tomcat environment

What steps will reproduce the problem?
1. Use JSMPP 2.0.1 in Tomcat 6.0.18 environment
2. Restart the context
3. NullPointerExceptions will start to appear regularely

Stacktrace:
Exception in thread "pool-2-thread-933" java.lang.NullPointerException
    at org.jsmpp.util.PDUByteBuffer.append(PDUByteBuffer.java:97)
    at org.jsmpp.util.PDUByteBuffer.append(PDUByteBuffer.java:115)
    at org.jsmpp.util.PDUByteBuffer.append(PDUByteBuffer.java:135)
    at org.jsmpp.util.PDUByteBuffer.(PDUByteBuffer.java:57)
    at org.jsmpp.util.PDUByteBuffer.(PDUByteBuffer.java:43)
    at 
org.jsmpp.util.DefaultComposer.composeHeader(DefaultComposer.java:50)
    at 
org.jsmpp.util.DefaultComposer.enquireLinkResp(DefaultComposer.java:173)
    at 
org.jsmpp.DefaultPDUSender.sendEnquireLinkResp(DefaultPDUSender.java:169)
    at 
org.jsmpp.SynchronizedPDUSender.sendEnquireLinkResp(SynchronizedPDUSender.j
ava:165)
    at 
org.jsmpp.session.SMPPSession$ResponseHandlerImpl.sendEnquireLinkResp(SMPPS
ession.java:502)
    at 
org.jsmpp.session.state.AbstractGenericSMPPSessionBound.processEnquireLink(
AbstractGenericSMPPSessionBound.java:47)
    at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:61)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j
ava:886)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
908)
    at java.lang.Thread.run(Thread.java:619)

These NullPointerExceptions keep appearing, each time from another thread.

CAUSE:
Tomcat sets all static variables to NULL on reloading a context. Because 
the background threads of JSMPP are still alive, they access the variable 
PDUByteBuffer.DEFAULT_CAPACITY_POLICY  which is then NULL.

SOLUTION:
If some method would exist that shuts down all background threadpools, the 
problem would be avoided.




Original issue reported on code.google.com by [email protected] on 5 Jun 2009 at 2:14

submitShortMessage IO error

What steps will reproduce the problem?
1. I have to separate programs, first program is message_listener, second 
is message_sender. when my message_listener receive the messages it will 
be inserted to database, the second program see for messages which not 
sent and will try to send their to destination
2. Both programs working in the loop "while(true)", once the get 
SMPPSession they will be keep it and do their work
3. Situation, i'm listen for messages to the short number for exm., 1221, 
due to some prevention works the administrator restart the SMPP server, 
after restart, my message_listener continue successfully receive the 
messages, but my message_sender get the following error due to 
submitShortMessage:
java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite
(SocketOutputStream.java:99)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:124)
    at org.jsmpp.DefaultPDUSender.writeAndFlush
(DefaultPDUSender.java:419)
    at org.jsmpp.DefaultPDUSender.sendSubmitSm
(DefaultPDUSender.java:203)
    at org.jsmpp.SynchronizedPDUSender.sendSubmitSm
(SynchronizedPDUSender.java:192)
    at org.jsmpp.session.SubmitSmCommandTask.executeTask
(SubmitSmCommandTask.java:86)
    at org.jsmpp.session.AbstractSession.executeSendCommand
(AbstractSession.java:248)
    at org.jsmpp.session.SMPPSession.submitShortMessage
(SMPPSession.java:317)

the operation system is CentOS Linux. I don't no about version which i use 
now, but i'm getting this jsmpp jar file from code.google.com 
approximately October 2008. 

My Question is, why my message_listener continue receive the messages 
after smpp server restarted (smmp server is not my server) but my message 
sender get an error. Both programs create SMPPSession at once in main 
method and never recreate it again at runtime

Original issue reported on code.google.com by [email protected] on 20 Apr 2009 at 7:22

SMPP Submit_sm - resp: "Invalid parameter length"

What steps will reproduce the problem?
1. submitShortMessage
2. Using service_type USSD
3.

What is the expected output? What do you see instead?
I expected Message submitted and I see SMPP Submit_sm - resp: "Invalid 
parameter length".

What version of the product are you using? On what operating system?
jsmpp 2.0, Windows XP.

Please provide any additional information below.
I'm tried to send a submit_sm from a request that I recieve, and then I 
get this reponse from the wireshark.

Original issue reported on code.google.com by [email protected] on 4 Aug 2009 at 2:01

Attachments:

EnquireLink doesnt work only bind is and no message is submitted and after 5 min connection is lost

What steps will reproduce the problem?
1. Run SimpleSubmitExample.java
2. Comment out shortmessagesubmit line
3. Remove unbind line also from the code
4. Dont submit any message for more than 5 min 

What is the expected output? What do you see instead?
We should have connection status as bind and enquirelink should work after
5 sec 

What version of the product are you using? On what operating system?
Tested jsmpp-2.0 and jsmpp-2.0.1  OS opens Suse 
Bind connection was possible  but after 5 min connection was lost .


Please provide any additional information below.
Patch 
First part of the patch is been fixed in recent version of setting
setSoTimeout before PDUReaderWorker().start() is made


  */
    public String connectAndBind(String host, int port,
            BindParameter bindParam, long timeout)
            throws IOException {
        logger.debug("Connect and bind to {} port {}", host, port);
        if (sequence().currentValue() != 1) {
            throw new IOException("Failed connecting");
        }

        conn = connFactory.createConnection(host, port);
        logger.info("Connected");
        conn.setSoTimeout(getEnquireLinkTimer());
        sessionContext.open();
        try {

Second patch is to check for the equireLink is null or not 

private void notifyNoActivity() {
            logger.debug("No activity notified");
            if (enquireLinkSender != null) {
                enquireLinkSender.enquireLink();
            }
        }




Original issue reported on code.google.com by [email protected] on 30 Jun 2009 at 11:19

SubmitMulti example

Dears

Would you please show me an example of how to use submit_multi PDU actually
I have problem in initializing DestinationAddress

DestinationAddress[] DEFAULT_DESTADDR=new
DestinationAddress(TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.ISDN,
"960504375312");

String messageId1= session.submitMultiple("CMT",
TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.ISDN, "54321", 
                            DEFAULT_DESTADDR, 
                            new ESMClass(), (byte)0, (byte)0, 
                            null, null, new RegisteredDelivery(0), 
                            (byte)0, 
                            new GeneralDataCoding(false, true,
MessageClass.CLASS1, Alphabet.ALPHA_DEFAULT), 
                            (byte)0, "test submit multi".getBytes());

I got those errors when I compiled

D:\Program Files\Xinox
Software\JCreatorV4\MyProjects\JSMPP\src\SimpleSubmitExample.java:63:
org.jsmpp.bean.DestinationAddress is abstract; cannot be instantiated
          DestinationAddress[] DEFAULT_DESTADDR=new
DestinationAddress(TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.ISDN,
"966504375312");//[1];
                                                ^
D:\Program Files\Xinox
Software\JCreatorV4\MyProjects\JSMPP\src\SimpleSubmitExample.java:68:
submitMultiple(java.lang.String,org.jsmpp.bean.TypeOfNumber,org.jsmpp.bean.Numbe
ringPlanIndicator,java.lang.String,org.jsmpp.bean.Address[],org.jsmpp.bean.ESMCl
ass,byte,byte,java.lang.String,java.lang.String,org.jsmpp.bean.RegisteredDeliver
y,org.jsmpp.bean.ReplaceIfPresentFlag,org.jsmpp.bean.DataCoding,byte,byte[],org.
jsmpp.bean.OptionalParameter[])
in org.jsmpp.session.SMPPSession cannot be applied to
(java.lang.String,org.jsmpp.bean.TypeOfNumber,org.jsmpp.bean.NumberingPlanIndica
tor,java.lang.String,org.jsmpp.bean.DestinationAddress[],org.jsmpp.bean.ESMClass
,byte,byte,<nulltype>,<nulltype>,org.jsmpp.bean.RegisteredDelivery,byte,org.jsmp
p.bean.GeneralDataCoding,byte,byte[])
           String messageId1= session.submitMultiple("CMT",
TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.ISDN, "54321", 
                                     ^
2 errors
Thanks a lot

Original issue reported on code.google.com by [email protected] on 28 Mar 2009 at 11:44

DeliveryReceipt dates are minute precision

What steps will reproduce the problem?
1. Send a message 
2. examine the date objects returned


What is the expected output? What do you see instead?
Dates should have at least second precision, as deliveries can happen in
les than a minute. All the dates at present are only second precision

What version of the product are you using? On what operating system?
2.0.1 on linux with jdk_1.5.0_20


Please provide any additional information below.
Tested against both the smpp simulator and an actual gateway (clickatell)

Original issue reported on code.google.com by [email protected] on 18 Aug 2009 at 9:04

Bug in validator

What steps will reproduce the problem?
1. I'm trying bind to my smsc with pass: "c8jhp34kx"
2. Your validator told me what in C - octet cannot be more then 9, but 9
digits is normally in smpp 3.4, 
3. please fix it

Original issue reported on code.google.com by [email protected] on 8 Apr 2009 at 11:06

NullPointerException while receving message using org.jsmpp.examples.SMPPServerSimulator

What steps will reproduce the problem?
1. Run the org.jsmpp.examples.SMPPServerSimulator
2. Send SMS using org.jsmpp.examples.SimpleSubmitExample
3.

What is the expected output? What do you see instead?
SMS should be displayed on SMPPserverSimulator console
instead a NullPointerException is seen

Exception in thread "main" java.lang.NullPointerException
    at
org.jsmpp.session.AbstractSessionContext.fireStateChanged(AbstractSessionContext
.java:65)
    at
org.jsmpp.session.SMPPServerSessionContext.changeState(SMPPServerSessionContext.
java:37)
    at
org.jsmpp.session.AbstractSessionContext.open(AbstractSessionContext.java:28)
    at org.jsmpp.session.SMPPServerSession.<init>(SMPPServerSession.java:91)
    at org.jsmpp.session.SMPPServerSession.<init>(SMPPServerSession.java:72)
    at
org.jsmpp.session.SMPPServerSessionListener.accept(SMPPServerSessionListener.jav
a:145)
    at org.jsmpp.examples.SMPPServerSimulator.run(SMPPServerSimulator.java:65)
    at org.jsmpp.examples.SMPPServerSimulator.main(SMPPServerSimulator.java:189)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)


What version of the product are you using? On what operating system?
jsmpp-2.0b_03-src

Please provide any additional information below.
Seems that a null reference is added to the sessionstatelistener in
AbstractSessionContext class. Adding null check at line 65 resolved the
issue. The check must be while adding the Session state listener. Null
listener should not be added

Original issue reported on code.google.com by [email protected] on 20 Aug 2008 at 11:33

Unable to receive message using jsmpp

I am using jsmpp for sending and receiving sms.

Sending sms is working great.

However while receiving sms certain SMS are not reaching the listener. I
contacted the smsc and they confirmed all the messages are acknowledged by
the client application (which is my application using jsmpp). Don't know
where these messages going if not reaching the message listener. Please assist.

Original issue reported on code.google.com by [email protected] on 30 May 2009 at 6:57

ProcessRequestException coming very oftenly

i am getting null pointer exception in the method given below
    public void onAcceptDeliverSm(DeliverSm deliverSm) throws 
ProcessRequestException
    {}
although my session is constantly bound and i am constantly receiving 
messages. Please let me know the reason and solution to the problem.

regards,

Original issue reported on code.google.com by [email protected] on 16 Mar 2009 at 8:40

Add Support for MultiSubmit in example

What steps will reproduce the problem?
1. Try to send Submit Multi SM

What is the expected output? What do you see instead?
The Server Simulator example doesn't support Submit MultiSM and the example 
file is missing

Please use labels and text to provide additional information.
Additional feature

Original issue reported on code.google.com by [email protected] on 8 Aug 2009 at 1:20

Access to Underlying Connection in ServerSession

For logging/restriction-checking purposes, there should be access to
Session's underlying Connection object. It's protected right now. 

This requirement will eventually lead to read-only access to Connetion's
socket object in fact.

Original issue reported on code.google.com by [email protected] on 19 May 2009 at 6:28

Improved pending response processing

Hi,

In my application I need to handle the deliver_sm_resp and submit_sm_resp
processing asynchronously. 

The attached patch simplifies the way PendingResponses are processed by
moving all the processing logic into a single PendingResponses class and
thus simplifying the session code quite a lot.

This patch also contains the previous patch for optional parameter support.


Original issue reported on code.google.com by [email protected] on 18 Mar 2008 at 9:30

Attachments:

Reopen: EnquireLink might not work on some conditions ( race condition )

Reopen of issue 13.
http://code.google.com/p/jsmpp/issues/detail?id=13

This issue does NOT require multiple processors.

The PDUReaderWorker thread calls readPDU prior to the main thread setting
the SoTimeout.  Until that read finishes the SoTimeout will not take
affect, so the enquireLink messages won't start until a transaction occurs.

Below is the logs with some added debug statements.

15:29:21.114 INFO  session.SMPPSession$PDUReaderWorker:535 [Starting
PDUReaderWorker with processor degree:3 ...] <Thread-4> 15:29:21.114 DEBUG
session.SMPPSession$PDUReaderWorker:537 [Calling readPDU()] <Thread-4>
15:29:21.196 DEBUG session.SMPPSession$PDUReaderWorker:539 [readPDU() done]
<Thread-4> 15:29:21.196 DEBUG session.SMPPSession$PDUReaderWorker:537
[Calling readPDU()] <Thread-4> 15:29:21.197 DEBUG
session.AbstractSessionContext:82 [Activity notified] <pool-2-thread-1>
15:29:21.197 DEBUG state.SMPPSessionOpen:57 [Bind Response header (31,
80000009, 00000000, 1)] <pool-2-thread-1> 15:29:21.199 DEBUG
session.AbstractSession:258 [bind response received] <main> 15:29:21.200
DEBUG session.SMPPSession$BoundSessionStateListener:654 [setting SoTimeout]
<main> 15:29:21.200 DEBUG session.SMPPSession$BoundSessionStateListener:654
[setting SoTimeout] <main> 

Original issue reported on code.google.com by [email protected] on 23 Apr 2009 at 9:06

Error parsing delivery reciept

Hello,

There is a typo in "org.jsmpp.bean.DeliveryReceipt" code.
You define DELREC_TEXT constant as "Text", but it should be "text" (at
least standard mentions it in lower case). Maybe it makes sense to search
for delivery receipt fields using case insensitive functions. 

Original issue reported on code.google.com by [email protected] on 29 Aug 2008 at 12:07

how to send ringtone and wap message

What steps will reproduce the problem?
1. how to add UDH header
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 4 Aug 2009 at 5:45

How to send SMS to mobile

Hi,

I am new in jsmpp. I have downloaded latest version of jsmpp 2.0.1 and add
all required jar files in classpath as mentioned in wiki docs. I have
successfully start the server and run the client SimpleSubmitExample. Got
log message in both server and client console as mentioned in
http://code.google.com/p/jsmpp/wiki/GettingStarted.

I am not so clear about the output - what happens to the submitted message?
How i can send the message to mobile? Please clarify me.

Regards,
Morshed Akther

Original issue reported on code.google.com by [email protected] on 19 Aug 2009 at 6:21

Not Getting long sms in one updation

hi,
   I am sending long sms through logica smpp using my java code.I am 
getting complete sms in several updations.
        Is there any way to get complete message in one updation???

          Thanks in advance....



Original issue reported on code.google.com by [email protected] on 1 Sep 2009 at 6:35

Incorrect decoding of short optional attributes

What steps will reproduce the problem?
1. Send a messages with a positive short (2-byte) attribute value with a
negative LSB
2. Check received value - it will be negative


What is the expected output? What do you see instead?
The received value is supposed to be the same as sent one

What version of the product are you using? On what operating system?
2.0b5

Please provide any additional information below.
This is an obvious bug in OctetUtils.bytesToShort(byte[] bytes, int offset)
(missed & 0xff) ; A similar code in OctetUtils.bytesToInt is correct

Original issue reported on code.google.com by [email protected] on 30 Oct 2008 at 8:09

Reconnecting problems

What steps will reproduce the problem (see JUnit Test)?
1. SMPPSession session = new SMPPSession()
2. session.connectAndBind(...)
3. session.submitShortMessage(...)
4. session.unbindAndClose()
5. session.connectAndBind(...) --> throws a java.io.IOException: Failed
connecting

Environment:
Java 5 (IBM SDK )
OS Windows XP Servicepack 3
Library jsmpp-2.0.1.jar
SMPPSim from http://www.seleniumsoftware.com/downloads.html

If we lost the connection to the smsc and receive a SocketException if we
send a sms, we try to reconnect to the smsc. The reconnect (see the steps
below) fails, because the current value of the sequence is not one. But if
we create a new session, the connectAndBind succeed. I think you should
reset the sequence in the unbindAndClose() method.

Regards,
Christian

Original issue reported on code.google.com by [email protected] on 30 Mar 2009 at 11:05

Attachments:

Null Pointer exception received sometimes while receiving messages

My application is working fine and constantly listening for incoming 
messages but sometimes this exception is thrown although process keeps on 
working
The session state is :true
Exception in thread "pool-2-thread-42" java.lang.NullPointerException
        at java.lang.String.<init>(String.java:479)
        at com.app.smsreceiver.smsutil.messagelistener.onAcceptDeliverSm(me
ssagelistener.java:34)
        at org.jsmpp.session.SMPPSession.fireAcceptDeliverSm
(SMPPSession.java:44
3)
        at org.jsmpp.session.SMPPSession.access$400(SMPPSession.java:92)
        at 
org.jsmpp.session.SMPPSession$ResponseHandlerImpl.processDeliverSm(SM
PPSession.java:460)
        at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0
(SMPPSess
ionBoundRX.java:109)
        at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm
(SMPPSessi
onBoundRX.java:51)
        at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:81)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
(ThreadPoolExec
utor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor
.java:675)
        at java.lang.Thread.run(Thread.java:595)
The session is :BOUND_RX

please let me know what is wrong with it.

regards,

Original issue reported on code.google.com by [email protected] on 18 Mar 2009 at 8:21

Typo in methodName - AbstractSmCommand.getOptionalParametes

What steps will reproduce the problem?
1. Use getOptionalParametes() on SubmitSM

Should be getOptionalParameters
Minor typo,can correct in any future release. Checked it on trunk as well.

What is the expected output? What do you see instead?



What version of the product are you using? On what operating system?
2.0


Original issue reported on code.google.com by [email protected] on 6 Dec 2008 at 11:45

how to receive arabic message through short code?

i am trying to receive arabic responce from user using jsmpp. but i am 
unable to decode the string sent by the user can you please send an 
example in order to read responce from user in arabic?. 

Original issue reported on code.google.com by waseem%[email protected] on 14 May 2009 at 2:57

nullpointer on smppsession-notifyNoActivity

What steps will reproduce the problem?

1.Put a break point on the smsc simulator so that a bind response will not
be sent.
2. start the jsmpp application.The nullpointer will occur and then  the
correct response timeout exception.


What is the expected output? What do you see instead?

Exception in thread "Thread-8" java.lang.NullPointerException
        at
org.jsmpp.session.SMPPSession$PDUReaderWorker.notifyNoActivity(SMPPSession.java:
583)
        at
org.jsmpp.session.SMPPSession$PDUReaderWorker.readPDU(SMPPSession.java:572)
        at
org.jsmpp.session.SMPPSession$PDUReaderWorker.run(SMPPSession.java:538) 



What version of the product are you using? On what operating system?

mac osx /windows xp/ubuntu.........runnning the current trunk code


Please provide any additional information below.

I fixed the nullpointer by just making sure enquireLinkSender was
instantiated(see my attached smppsession). Another way is to simply add a
null check to notifyNoActivity.

private void notifyNoActivity() {
            logger.debug("No activity notified");
                        if(enquireLinkSender!=null){
                enquireLinkSender.enquireLink();
                }
}

Could any of these changes please be added to trunk?I don't want a custom
version of jsmpp that differs from trunk..



Original issue reported on code.google.com by [email protected] on 12 Jun 2009 at 9:38

Attachments:

JSMPP - client IP address of an incoming connection

Hi,

I am playing with JSMPP code now.My requirement is to filter incoming bind
requests to my server based on client IP address. Is there anyway, I can
find the IP address for incoming connection requests. Any pointers
appreciated. Thanks a lot!


-Ila



Original issue reported on code.google.com by [email protected] on 21 Jul 2009 at 4:40

Sending an SMS to port (Midlet push registry) does not work.

Hello, 

I'm trying to send an SMS to a port with jsmpp. I use submitShortMessage()
method with the following optional parameter: 

Int destiantionPort = new Int(Tag.DESTINATION_PORT, Integer.parseInt(5000));

which I pass to the sumbitShortMessage method. 

The SMPP frame captured with wireshark shows the optional parameter
"Destination Port" to 0x0000 

0000   00 00 5e 00 01 02 00 05 9a 3c 78 00 08 00 45 00
0010   00 ae 01 9c 40 00 80 06 c8 45 0a 0a 02 32 ac 10
0020   78 1c 09 6e 10 e1 76 81 79 55 0a 80 80 06 50 18
0030   44 d2 66 00 00 00 00 00 00 86 00 00 00 04 00 00
0040   00 00 00 00 00 02 43 4d 54 00 00 09 32 33 34 32
0050   00 02 01 36 30 38 37 36 35 33 35 38 00 00 00 00
0060   00 00 00 00 11 00 4d 4f 50 45 4e 54 43 50 3b 30
0070   2e 39 2e 30 3b 50 6c 61 63 65 62 6f 6f 6b 3b 68
0080   74 74 70 3a 2f 2f 73 65 72 76 69 6e 74 2e 64 65
0090   69 6d 6f 73 2d 73 70 61 63 65 2e 63 6f 6d 3a 34
00a0   39 31 35 35 2f 61 6a 6f 62 2f 31 32 33 34 35 36
00b0   3b 31 3b 31 02 0b 00 04 00 00 13 88

Debugging the code I've followed the optional parameter until the
PduByteBuffer class, keeping the value "5000" as far as my knowledge
permits me. But somewhere the value is lost, and is not sent properly to
the SMPP server. 

Or am I missing something? 

Original issue reported on code.google.com by felix.pedrera on 22 Jan 2009 at 2:43

serversession gives following exceptions on high load

What steps will reproduce the problem?
1. Get an SMPPServerSession
2. Push 50> sms per second from client
3. It gives following errors/

sommetimes:

java.io.IOException: Unexpected length of byte readed. Expecting 55 but 
only read 16
at org.jsmpp.DefaultPDUReader.readPDU(DefaultPDUReader.java:85)
at org.jsmpp.DefaultPDUReader.readPDU(DefaultPDUReader.java:61)
at org.jsmpp.session.SMPPServerSession$PDUReaderWorker.readPDU
(SMPPServerSession.java:500)

sometimes:

java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:375)
at org.jsmpp.DefaultPDUReader.readPDUHeader(DefaultPDUReader.java:41)
at org.jsmpp.session.SMPPServerSession$PDUReaderWorker.readPDU
(SMPPServerSession.java:499)
at org.jsmpp.session.SMPPServerSession$PDUReaderWorker.run
(SMPPServerSession.java:487)

What version of the product are you using? On what operating system?
I'm testing on linux / Debian 5. version is the latest available version 
on project home.

Please provide any additional information below.

Uudashr, first of all; i want to admit that it's a great pleasure to 
examine and play with your code. I loved your coding style and pattern 
usage. There's so much to get for me from those codes. Thank you very much 
for sharing those valuable code with the public.

I'm trying to develop an smpp - gateway server; whic is expected to handle 
500 sms/sec. I've developed the first version with very much help of your 
code. And at the testin phase. I'm using an smppclient(asynchronous) 
module which is also developed by me 2 years ago based on logica smpp. It 
has been used with more than 20 smsc's; and can push upto 400-500 sms/sec 
to other servers. With the gateway server i've developed; the best rate i 
get is 40 sms/sec. when i go over it; i get the above exceptions; which 
cause the smppserversession to get closed. i've tried incresing 
pduprocessordegree but nothing changed. i think no issue with it.

Hoping you to show me the right way :).

regards;

Original issue reported on code.google.com by [email protected] on 13 Apr 2009 at 11:13

Delivery reciept generation is broken

Hi,

It seems there is a problem in DeliveryReceipt.toString() method.
First, a typo where you use DELREC_STAT instead of DELREC_ERR. 
And second, just a suggestion. In my opinion, field lengths should be
limited while generating text. For example ERR should be 3 octets exactly,
but you can pass any value to the constructor, and it will get to delivery
receipt text unchanged. Sure, programmer who uses library could check that
before creating object, but imho library should do it. 

Original issue reported on code.google.com by [email protected] on 1 Sep 2008 at 12:45

JVM Crash on Windows 2003 SP2

What steps will reproduce the problem?
N/A

What is the expected output? What do you see instead?
The application should run smoothly, however it crashes without notice.

What version of the product are you using? On what operating system?
Product Version: 2.1.0
OS: Windows 2003 SP2


Please provide any additional information below.
I am attaching the HotSpot Dump file. I hope I can get some feedback from
someone on this.

Best

Original issue reported on code.google.com by [email protected] on 13 Sep 2009 at 9:01

Attachments:

delivery reports over the internet causing the session to lockup.

What steps will reproduce the problem?

To recreate the problem we need a server and a client pc.

The server must be exposed to the internet and the client must have access
to the internet to.

It is crucial that the client and server not be on the same lan.


1. Down load selenium smsc sim.
http://www.seleniumsoftware.com/regform.php?itemdesc=SMPPSim.zip and let it
run on the server.

The deafaut's are 
port :2775
username:smppclient
password: password

2.download the 2.0.1 jsmpp source and open AsyncSubmitReceiveDeliverSmExample

2. add the servers ip,port/username/password to 
AsyncSubmitReceiveDeliverSmExample. Set the message loop to 100 and run it
on the client.


<What is the expected output? What do you see instead?>

we are expected to see the submitted messages and then the delivery reports
for them.

I get the following(I increased the transaction timer to 50seconds)
The problem goes away if I disable the delivery reports...Its almost like
the message listener locks up the session????????

The program output is as follows..


Message submitted, message_id is 75
Message submitted, message_id is 76
Message submitted, message_id is 77
Message submitted, message_id is 78
Message submitted, message_id is 79
Message submitted, message_id is 82
Message submitted, message_id is 83
Message submitted, message_id is 80
Message submitted, message_id is 81
Message submitted, message_id is 84
Message submitted, message_id is 85
Message submitted, message_id is 86
Message submitted, message_id is 87
Message submitted, message_id is 88
Message submitted, message_id is 89
Message submitted, message_id is 90
Message submitted, message_id is 91

   <<<<<<<<<<< ...... allot of Message submitted's it was almost an 100 but
then the first batch of del reports came in......>>>>>>>>>>>>>>>

Receiving delivery receipt for message '4D' : id:77 sub:001 dlvrd:001
submit date:0903231217 done date:0903231217 stat:DELIVRD err:000 text:jSMPP
simplify SMPP 
Receiving delivery receipt for message '50' : id:80 sub:001 dlvrd:001
submit date:0903231217 done date:0903231217 stat:DELIVRD err:000 text:jSMPP
simplify SMPP 
Receiving delivery receipt for message '58' : id:88 sub:001 dlvrd:001
submit date:0903231217 done date:0903231217 stat:DELIVRD err:000 text:jSMPP
simplify SMPP 
Receiving delivery receipt for message '5A' : id:90 sub:001 dlvrd:001
submit date:0903231217 done date:0903231217 stat:DELIVRD err:000 text:jSMPP
simplify SMPP 
Receiving delivery receipt for message '52' : id:82 sub:001 dlvrd:001
submit date:0903231217 done date:0903231217 stat:DELIVRD err:000 text:jSMPP
simplify SMPP 
Receiving delivery receipt for message '56' : id:86 sub:001 dlvrd:001
submit date:0903231217 done date:0903231217 stat:DELIVRD err:000 text:jSMPP
simplify SMPP 
Receiving delivery receipt for message '5C' : id:92 sub:001 dlvrd:001
submit date:0903231217 done date:0903231217 stat:DELIVRD err:000 text:jSMPP
simplify SMPP 
Response timeout
Response timeout
Response timeout
Response timeout
Response timeout
Response timeout
Response timeout
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for
50000 millis when executing submit_sm with sessionId b30033dd and
sequenceNumber 54
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:261)
    at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:319)
    at
AsyncSubmitReceiveDeliverSmExample$2.run(AsyncSubmitReceiveDeliverSmExample.java
:122)62

    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after
50000 millis
    at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:117)
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:257)
    ... 5 more
Response timeout
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for
50000 millis when executing submit_sm with sessionId b30033dd and
sequenceNumber 60
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:261)
    at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:319)
    at
AsyncSubmitReceiveDeliverSmExample$2.run(AsyncSubmitReceiveDeliverSmExample.java
:122)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after
50000 millis
    at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:117)
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:257)
    ... 5 more
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for
50000 millis when executing submit_sm with sessionId b30033dd and
sequenceNumber 59
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:261)
    at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:319)
    at
AsyncSubmitReceiveDeliverSmExample$2.run(AsyncSubmitReceiveDeliverSmExample.java
:122)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after
50000 millis
    at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:117)
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:257)
    ... 5 more
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for
50000 millis when executing submit_sm with sessionId b30033dd and
sequenceNumber 56
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:261)
    at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:319)
    at
AsyncSubmitReceiveDeliverSmExample$2.run(AsyncSubmitReceiveDeliverSmExample.java
:122)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after
50000 millis
    at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:117)
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:257)
    ... 5 more
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for
50000 millis when executing submit_sm with sessionId b30033dd and
sequenceNumber 57
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:261)
    at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:319)
    at
AsyncSubmitReceiveDeliverSmExample$2.run(AsyncSubmitReceiveDeliverSmExample.java
:122)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after
50000 millis
    at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:117)
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:257)
    ... 5 more
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for
50000 millis when executing submit_sm with sessionId b30033dd and
sequenceNumber 58
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:261)
    at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:319)
    at
AsyncSubmitReceiveDeliverSmExample$2.run(AsyncSubmitReceiveDeliverSmExample.java
:122)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after
50000 millis
    at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:117)
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:257)
    ... 5 more
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for
50000 millis when executing submit_sm with sessionId b30033dd and
sequenceNumber 61
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:261)
    at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:319)
    at
AsyncSubmitReceiveDeliverSmExample$2.run(AsyncSubmitReceiveDeliverSmExample.java
:122)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after
50000 millis
    at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:117)
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:257)
    ... 5 more
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for
50000 millis when executing submit_sm with sessionId b30033dd and
sequenceNumber 55
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:261)
    at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:319)
    at
AsyncSubmitReceiveDeliverSmExample$2.run(AsyncSubmitReceiveDeliverSmExample.java
:122)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after
50000 millis
    at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:117)
    at
org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:257)
    ... 5 more
IO error occur
IO error occur
IO error occur
IO error occur
IO error occur
IO error occur
IO error occur
java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(Unknown Source)
    at java.net.SocketOutputStream.write(Unknown Source)
    at org.jsmpp.DefaultPDUSender.writeAndFlush(DefaultPDUSender.java:419)
    at org.jsmpp.DefaultPDUSender.sendSubmitSm(DefaultPDUSender.java:203)
    at
org.jsmpp.SynchronizedPDUSender.sendSubmitSm(SynchronizedPDUSender.java:192)








What version of the product are you using? On what operating system?

tested this with version 2.01 on windows and Linux.


Please provide any additional information below.

works like a charm on a lan ................


Original issue reported on code.google.com by [email protected] on 23 Mar 2009 at 10:31

Incorrect State in Exception for waitForBind(long timeout)

What steps will reproduce the problem?
1. Send Bind request, when Session State is other than SessionState.OPEN

What is the expected output? What do you see instead?
Current state should be displayed in the Exception. Currently, it always 
show actual state as SessionState.OPEN


What version of the product are you using? On what operating system?
From trunk


Please provide any additional information below.
This is possibly coz of a typo on line 
throw new IllegalStateException("waitForBind() should be invoked on OPEN 
state, actual state is " + SessionState.OPEN);

The line should be
throw new IllegalStateException("waitForBind() should be invoked on OPEN 
state, actual state is " + getSessionState());


Original issue reported on code.google.com by [email protected] on 21 Nov 2008 at 2:00

Asynchronous Message sending

Currently when we use the example for simple message sender the operation 
is blocked till it receives the response or it times out but i want to 
send messages without waiting for response. Please let me know how to do 
it.

regards,

Original issue reported on code.google.com by [email protected] on 16 Mar 2009 at 8:37

Optional parameter support

Hi, 

We're testing jsmpp for usage in our application, and came across the need
to support optional parameters in PDUs.

The attached patch contains a simple implementation, allowing:
* Adding OptionalParameters to PDU's
* Serialising and deserialising the parameters

Patch created against HEAD, r42.


Original issue reported on code.google.com by [email protected] on 28 Feb 2008 at 8:50

Attachments:

SMPP Server session should expose remote client details

What steps will reproduce the problem?
1. Create a Server based on jsmpp


What is the expected output? What do you see instead?
The library doesn't provide the code to get the remote IP. The connection 
details are available and should be exposed, so that strong authentication 
mechanism based on IP and System ID can be coded


What version of the product are you using? On what operating system?
Win/Linux

Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 8 Dec 2008 at 5:31

deliverSm.getShortMessage() always returns null

deliverSm.getShortMessage() is always retruning null while receiving sms
message, other data like source address, destination address, data coding
for received messsage is coming correctly, however the sms text is always null.

Please suggest as i am unable to complete my application to receive and
process SMS messages.


Original issue reported on code.google.com by [email protected] on 11 Apr 2009 at 2:56

Too complex SMPP library

I strongly recommend you to improve OOP aspect of your library to hide all
complexity of smpp from library user.

I've writed own smpp library for company inner use. This is example of
sending message to SMSC:

try {
            SMPPClient client = new SMPPClientImpl(new MessageHandler() {
                public void handle(Message message) throws
ProcessingFailedException {
                    System.out.println("incoming message received");
                }

                public void deliveredToDest(String messageId) {
                    System.out.println("message delivered to user");
                }
            }, "localhost", 9999, ConnectionType.TRANSCEIVER, "mysysid",
                    "mypass", "test", (short) 0, (short) 0, null, false);
            String messageId = client.send(new Message("src", "dest",
"hello"));
            System.out.println("message delivered to smsc");
            client.stop();
        } catch (SMPPException e) {
            e.printStackTrace();
        }

Original issue reported on code.google.com by [email protected] on 28 Nov 2008 at 12:03

EnquireLink might not work on some conditions ( race condition )

What steps will reproduce the problem?
1. When starting a session on a multi-processor machine, sometime the
Activity Notification Thread get stuck on a inputStrem.read() call.
2.
3.

What is the expected output? 
The activity monitor should kick in and send an enquire_link PDU.
What do you see instead?
When this condition occurs the enquire_link PDU does not  get sent and the
SMSC will close the connexion after a small period of tile.

What version of the product are you using? On what operating system?
JSMPP 2.0 On a linux 2 processor system, JDK 1.6.0_6

The problem is caused because the EnquireLinkSender Thread can get stuck in
readPDU() if the call is made before the connection.setSoTimeout() is
called. Therefore the in.read() will block forever.

The attached patch fixes the issue by calling the setSoTimeout() right
after the connection is opened and by adding a state check in
notifyNoActivity() to ensure that the session is opened before sending the
enquire_link PDU.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 Dec 2008 at 10:58

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.