grealish / pwm

Automatically exported from code.google.com/p/pwm
0 stars 0 forks source link

Sending SMS java.lang.Long incompatible with java.lang.String in smsQueueManager #320

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure PWM to send SMS
2. Follow the 'Forgotten password' steps
3. When the SMS should be send, the 'enter code' screen appears in the browser 
but catalina.out reports a java.lang.Long incompatible with java.lang.String 
error with smsQueueManager

If I switch the system to use 'token send by email' everything is running fine. 
Problem only occurs if 'token send by sms'
No difference between if token is stored in LDAP or token is stored in pwmDB
No difference between using different browser (localization, nl or en)

What is the expected output? What do you see instead?
I expect to receive SMS

What version of PWM are you using?
- At first using PWM 1.6.4, SMS system was running fine but ran into #281.
- Now running pwm-20130115-0600.war

What ldap directory and version are you using?

Please paste any error log messages below:
2013-01-16 10:16:46, DEBUG, servlet.ForgottenPasswordServlet, {2f~} generated 
token code for session [10.xx.xx.xx/xxx.xxxxxxx.nl]
2013-01-16 10:16:46, TRACE, servlet.ForgottenPasswordServlet, Reading setting 
EMAIL_USER_MAIL_ATTRIBUTE
2013-01-16 10:16:46, TRACE, servlet.ForgottenPasswordServlet, Email address: 
xxx@xxxxxx.nl
2013-01-16 10:16:46, TRACE, servlet.ForgottenPasswordServlet, reading setting 
SMS_USER_PHONE_ATTRIBUTE
2013-01-16 10:16:46, TRACE, servlet.ForgottenPasswordServlet, SMS number: 
06-12345678
2013-01-16 10:16:46, DEBUG, servlet.ForgottenPasswordServlet, {2f~} token SMS 
added to send queue for 06-12345678 [10.xx.xx.xx/xxx.xxxxxxx.nl]
2013-01-16 10:16:46, ERROR, queue.SmsQueueManager, unexpected exception while 
processing mail queue: java.lang.Long incompatible with java.lang.String
java.lang.ClassCastException: java.lang.Long incompatible with java.lang.String
    at password.pwm.config.Configuration.readSettingAsString(Configuration.java:169)
    at password.pwm.util.queue.SmsQueueManager.formatSmsNumber(SmsQueueManager.java:308)
    at password.pwm.util.queue.SmsQueueManager.sendSmsPart(SmsQueueManager.java:190)
    at password.pwm.util.queue.SmsQueueManager.sendItem(SmsQueueManager.java:165)
    at password.pwm.util.queue.AbstractQueueManager$QueueThread.processQueue(AbstractQueueManager.java:228)
    at password.pwm.util.queue.AbstractQueueManager$QueueThread.run(AbstractQueueManager.java:189)
2013-01-16 10:16:46, ERROR, queue.SmsQueueManager, unable to process email 
queue successfully; sleeping for 1m
2013-01-16 10:17:16, TRACE, pwm.EventManager, {1h~} http session destroyed
2013-01-16 10:17:16, TRACE, pwm.EventManager, {2a~} http session destroyed
2013-01-16 10:17:16, TRACE, pwm.EventManager, {1s~} http session destroyed
2013-01-16 10:17:16, TRACE, pwm.EventManager, {21~} http session destroyed
<SNIP>
013-01-16 10:17:16, TRACE, pwm.EventManager, {1j~} http session destroyed
2013-01-16 10:17:16, TRACE, pwm.EventManager, {22~} http session destroyed
2013-01-16 10:17:46, DEBUG, queue.SmsQueueManager, discarding event due to 
maximum retry age: {"to":"06-12345678","from":"MySmsID","message":"Your 
activation token is 
NMSCVJHWDGUUPURP.","partlength":140,"pos":0,"localeString":"nl"}

Original issue reported on code.google.com by mer...@5and8.nl on 16 Jan 2013 at 9:34

GoogleCodeExporter commented 9 years ago

Original comment by menno.pi...@gmail.com on 16 Jan 2013 at 1:37

GoogleCodeExporter commented 9 years ago
Should be fixed now. Could you check?

Original comment by menno.pi...@gmail.com on 17 Jan 2013 at 7:04

GoogleCodeExporter commented 9 years ago
Great job! Fixed.

(Now maybe running into a different issue with ldapchai ldap settings always 
default, but will check everything first and -if so- create a different issue)

Original comment by mer...@5and8.nl on 17 Jan 2013 at 7:53