Code Monkey home page Code Monkey logo

Comments (4)

pmoerenhout avatar pmoerenhout commented on July 20, 2024

Hi Chuuyen,

Do you have the binary message which is received ?
Or can you explain what kind of message it is ?

Regards, Pim

On 8 jul. 2016, at 11:22, Chuyen Nguyen [email protected] wrote:

Hello Sir,

I have using your lib, when I receive the long message it's throw Exception like:

Exception in thread "pool-2-thread-3" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at org.jsmpp.util.SequentialBytesReader.readBytes(SequentialBytesReader.java:80)
at org.jsmpp.util.DefaultDecomposer.readOptionalParameters(DefaultDecomposer.java:625)
at org.jsmpp.util.DefaultDecomposer.deliverSm(DefaultDecomposer.java:368)
at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0(SMPPSessionBoundRX.java:108)
at org.jsmpp.session.state.SMPPSessionBoundTRX.processDeliverSm(SMPPSessionBoundTRX.java:42)
at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

How I resolved it?

Thanks,


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #50, or mute the thread https://github.com/notifications/unsubscribe/AFwpfhI1Dh-jO5QEKVKQASIUnbZ5yNKcks5qThblgaJpZM4JH3Jn.

from jsmpp.

chuyennm avatar chuyennm commented on July 20, 2024

I have used SMPPSim to test it,

The message is: "Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,"

image

it's error from core received the long message.

Cheers,

from jsmpp.

pmoerenhout avatar pmoerenhout commented on July 20, 2024

Hi Chuygen,

I used the SMPP Sim. I see that when the message is 254 chars, all is OK.
When the message is 255, the simulator uses 255 as length, which is illegal in SMPP 3.4. In SMPP 5.0 its legal.
jSMPP then correctly displays (for SMPP 3.4):
Octet String value 'ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDE' length must be less than or equal to 254. Actual length is 255

When more then 255 characters are send, if goes wrong.
For example, when 256 characters are send, the short_message length is set to 0x00 by the SMPPSim software.
Then jSMPP cannot decode correctly, because the PDU is not following the SMPP specification.

I will add some extra checking on the message length for SMPP 3.4.
But the biggest problem is within SMPPSim.
Longer messages needs to be put into a TLV message_payload, not in short_message....

Form the spec: Applications which need to send messages longer than 255 octets should use the message_payload TLV. In this case the sm_length field should be set to zero

Regards, Pim

On 9 jul. 2016, at 04:06, Chuyen Nguyen [email protected] wrote:

I have used SMPPSim to test it,

The message is: "Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,Hello from SMPPSim,"

https://cloud.githubusercontent.com/assets/767746/16705447/4b137acc-45b4-11e6-8d3a-a0155c5f3f3e.png
it's error from core received the long message.

Cheers,


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #50 (comment), or mute the thread https://github.com/notifications/unsubscribe/AFwpfuQZSdXqUgAOFSeqV9CteKSPkgWtks5qTwIkgaJpZM4JH3Jn.

from jsmpp.

chuyennm avatar chuyennm commented on July 20, 2024

Thanks Sir, im properly understood that.

from jsmpp.

Related Issues (20)

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.