Need help in JSMPP -

387 views
Skip to first unread message

gopal

unread,
Apr 6, 2009, 4:53:11 AM4/6/09
to jsmpp


i am new to JAVA...
i have used the JSMPP jar and the simplesmssubbmiter program code.
i am using netbeans editor

while executing the jar file, i am getting this error msg.

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/
LoggerFactory
at org.jsmpp.session.AbstractSession.<clinit>
(AbstractSession.java:51)
at org.jsmpp.SimpleSubmitExample.main(SimpleSubmitExample.java:
46)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
320)
... 2 more
Java Result: 1

Deepak Agarwal

unread,
Apr 6, 2009, 5:04:28 AM4/6/09
to js...@googlegroups.com
You need to add slf4j related jars to your classpath. (its a wrapper logger)
--

Thanks,
Deepak Agarwal,
+91-9818469996

gopal

unread,
Apr 6, 2009, 5:18:34 AM4/6/09
to jsmpp


Thanks for quick reply. i have added below jar files.

slf4j-log4j12-1.4.3.jar
slf4j-api-1.4.3.jar
log4j-1.2.14.jar

Now i am getting the below error.

log4j:WARN No appenders could be found for logger
(org.jsmpp.session.SMPPSession).
log4j:WARN Please initialize the log4j system properly.
how to go ahead.

Deepak Agarwal

unread,
Apr 6, 2009, 5:26:42 AM4/6/09
to js...@googlegroups.com

put logging.properties files (these loggers use this file to configure themselves ) in your class path , else use BasicConfigurator or PropertyConfigurator class to configure programmatically ( do it in a static block of your main class file ).
Otherwise , it's just a warning and it means you won't get any logging . but your program will run fine.

gopal

unread,
Apr 6, 2009, 6:50:43 AM4/6/09
to jsmpp
thanks,

i am able to connect, but receiving negative response. "Receive
negative response" while binding,
Any idea on this, would help me a lot

Deepak Agarwal

unread,
Apr 6, 2009, 7:17:31 AM4/6/09
to js...@googlegroups.com
jsmpp uses system id (equivalent to username) and password to authenticate , check if you are passing the correct authentication parameters.

gopal

unread,
Apr 6, 2009, 7:47:11 AM4/6/09
to jsmpp
hi

authentication parameters are correct.
i am not getting error during login.
problem occurs when i push the sms to smsc

regards
gopal

Deepak Agarwal

unread,
Apr 6, 2009, 7:56:07 AM4/6/09
to js...@googlegroups.com
you need to check the source and destination address for that . also paste the error code here so that i can dignose.

uud ashr

unread,
Apr 6, 2009, 8:10:40 AM4/6/09
to js...@googlegroups.com
You need to specify the error

gopal

unread,
Apr 6, 2009, 8:20:13 AM4/6/09
to jsmpp
please find the error i am getting..

log4j:WARN No appenders could be found for logger
(org.jsmpp.session.SMPPSession).
log4j:WARN Please initialize the log4j system properly.
Receive negative response=Negative response 0000000a found
org.jsmpp.extra.NegativeResponseException: Negative response 0000000a
found
at org.jsmpp.session.AbstractSession.validateResponse
(AbstractSession.java:215)
at org.jsmpp.session.AbstractSession.executeSendCommand
(AbstractSession.java:271)
at org.jsmpp.session.SMPPSession.submitShortMessage
(SMPPSession.java:318)
at org.jsmpp.SimpleSubmitExample.main(SimpleSubmitExample.java:
56)

also find the parametters.
String messageId = session.submitShortMessage("CMT",
TypeOfNumber.NATIONAL, NumberingPlanIndicator.ISDN, "919942201133",
TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.ISDN,
"919942201133", new ESMClass(), (byte)0, (byte)1, timeFormatter.format
(new Date()), null, new RegisteredDelivery
(SMSCDeliveryReceipt.DEFAULT), (byte)0, new GeneralDataCoding(false,
true, MessageClass.CLASS1, Alphabet.ALPHA_DEFAULT), (byte)0, "jSMPP
simplify SMPP on Java platform".getBytes());

constantin.horia

unread,
Apr 6, 2009, 9:21:49 AM4/6/09
to jsmpp
Are you still having problems with the code?

gopal

unread,
Apr 6, 2009, 9:36:46 AM4/6/09
to jsmpp
yes, i am new to java and finds difficult to rectify the errors.
please do help me.




On Apr 6, 6:21 pm, "constantin.horia" <constantin.ho...@gmail.com>
wrote:

uud ashr

unread,
Apr 6, 2009, 10:26:33 PM4/6/09
to js...@googlegroups.com
SMSC reject your message with error code 0x0000000a .
I suggest you read smpp specification http://groups/google.com/group/jsmpp/files , protocol specification and error codes defined there. 0x0000000a means Invalid source address.
It seems that you try to send message to your self from (from 919942201133 to 919942201133), are you trialing or the SMSC already give you those number granted for your account?

gopal

unread,
Apr 7, 2009, 12:10:08 AM4/7/09
to jsmpp
hope the link is not working...
i have even chaged the source to 1234 or abcd... i get the same error.


regards
gopal R

On Apr 7, 7:26 am, uud ashr <uuda...@gmail.com> wrote:
> SMSC reject your message with error code 0x0000000a .
> I suggest you read smpp specificationhttp://groups/google.com/group/jsmpp/files, protocol specification and
> error codes defined there. 0x0000000a means Invalid source address.
> It seems that you try to send message to your self from (from 919942201133
> to 919942201133), are you trialing or the SMSC already give you those number
> granted for your account?
>

Deepak Agarwal

unread,
Apr 7, 2009, 1:47:43 AM4/7/09
to js...@googlegroups.com
The actual link is :- http://groups.google.com/group/jsmpp/files
And as uuadshr said 0x00000000a error code means your smsc is rejecting the source address you are providing. are you using an actual smsc or a simulator ?

uud ashr

unread,
Apr 7, 2009, 2:23:04 AM4/7/09
to js...@googlegroups.com
consult with your telecommunication company, ask them about the valid source address for your account.
Reply all
Reply to author
Forward
0 new messages