PammyS / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

exception while receiving delivery_receipt #51

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. send submit_sm
2. receive delivery_receipt
3. catch an exception:(

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

2009-09-17 17:08:16,668 [pool-2-thread-2] ERROR 112
:smppclient.processor.MessageReceiverListenerImpl - Failed getting delivery
receipt
org.jsmpp.util.InvalidDeliveryReceiptException: There is an error found
when parsing delivery receipt
    at org.jsmpp.bean.DeliveryReceipt.<init>(Unknown Source)
    at org.jsmpp.util.DefaultDecomposer.deliveryReceipt(Unknown Source)
    at org.jsmpp.util.DefaultDecomposer.deliveryReceipt(Unknown Source)
    at org.jsmpp.bean.DefaultDeliveryReceiptStripper.strip(Unknown Source)
    at org.jsmpp.bean.DefaultDeliveryReceiptStripper.strip(Unknown Source)
    at org.jsmpp.bean.DeliverSm.getDeliveryReceipt(Unknown Source)
    at org.jsmpp.bean.DeliverSm.getShortMessageAsDeliveryReceipt(Unknown Source)
    at
ru.intech.smppclient.processor.MessageReceiverListenerImpl.onAcceptDeliverSm(Mes
sageReceiverListenerImpl.java:105)
    at org.jsmpp.session.SMPPSession.fireAcceptDeliverSm(Unknown Source)
    at org.jsmpp.session.SMPPSession.access$400(Unknown Source)
    at
org.jsmpp.session.SMPPSession$ResponseHandlerImpl.processDeliverSm(Unknown
Source)
    at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0(Unknown
Source)
    at org.jsmpp.session.state.SMPPSessionBoundTRX.processDeliverSm(Unknown
Source)
    at org.jsmpp.session.PDUProcessTask.run(Unknown Source)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
86)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:415)
    at java.lang.Integer.parseInt(Integer.java:497)
    ... 17 more

What version of the product are you using? On what operating system?
-linux(suse, rh), windows(xp,vista)

Original issue reported on code.google.com by denis.internal@gmail.com on 17 Sep 2009 at 6:20

GoogleCodeExporter commented 8 years ago
Same issue there. Looks like parsing delivery receipt without some fields
(sub/dlvrd/etc) lead to parsing exception. Attached patch (against trunk) fixes 
this
issue by substituting nonexistent values by their defaults.

Original comment by v.antono...@gmail.com on 30 Apr 2010 at 1:21

Attachments:

GoogleCodeExporter commented 8 years ago
I have the same problem. However, I can't apply you patch. Could you give me 
some
guidelines how to do this in Eclipse?

--
Andreas

Original comment by andreas....@gmail.com on 28 May 2010 at 9:45

GoogleCodeExporter commented 8 years ago
Never mind. I missed the part where you said "against trunk" :)

Original comment by andreas....@gmail.com on 28 May 2010 at 1:26

GoogleCodeExporter commented 8 years ago
Is there a way to resolve this issue in the current version (jsmpp-2.1.0.jar)?

jsmpp is working great if not for this issue. 

Any help in resolving this issue is highly appreciated.

Thanks,
Wasantha

Original comment by wasan...@gmail.com on 16 Sep 2010 at 7:37

GoogleCodeExporter commented 8 years ago
Hi,

Anyone able to help me out?

Thanks,
Wasantha

Original comment by wasan...@gmail.com on 25 Sep 2010 at 5:06

GoogleCodeExporter commented 8 years ago
Use my attach

Many thank to Antono..@

Original comment by i...@sanmua.com on 31 Mar 2013 at 8:36

Attachments:

GoogleCodeExporter commented 8 years ago
HI,
thanks for the code but i am getting and error even after that 

org.jsmpp.util.InvalidDeliveryReceiptException: There is an error found when 
parsing delivery receipt 0x000e
    at org.jsmpp.bean.DeliveryReceipt.<init>(DeliveryReceipt.java:80)
    at org.jsmpp.util.DefaultDecomposer.deliveryReceipt(DefaultDecomposer.java:394)
    at org.jsmpp.util.DefaultDecomposer.deliveryReceipt(DefaultDecomposer.java:404)
    at org.jsmpp.bean.DeliverSm.getShortMessageAsDeliveryReceipt(DeliverSm.java:42)
    at sms.Server.handler.SmsReceiverListener.onAcceptDeliverSm(SmsReceiverListener.java:47)
    at org.jsmpp.session.SMPPSession.fireAcceptDeliverSm(SMPPSession.java:445)
    at org.jsmpp.session.SMPPSession.access$400(SMPPSession.java:92)
    at org.jsmpp.session.SMPPSession$ResponseHandlerImpl.processDeliverSm(SMPPSession.java:462)
    at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0(SMPPSessionBoundRX.java:109)
    at org.jsmpp.session.state.SMPPSessionBoundTRX.processDeliverSm(SMPPSessionBoundTRX.java:42)
    at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:81)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Name is null
    at java.lang.Enum.valueOf(Unknown Source)
    at org.jsmpp.util.DeliveryReceiptState.getByName(DeliveryReceiptState.java:60)
    at org.jsmpp.bean.DeliveryReceipt.<init>(DeliveryReceipt.java:74)
    ... 13 more

Original comment by mohandez...@gmail.com on 16 Sep 2013 at 3:51