HTTP 500 error when trying to submit PPI survey

Description

Note, I've only repro-ed this on the test server, not on a clean db.

Arpita-- can you try to repro this on a clean db and see if the bug still
exists?

To Repro:
Search for client (in test server "Mauricio Papasodaro")
Click on loan account
Click "Attach a survey", select PPI India survey, fill out questions,
hit "submit"

Actual:
You receive an http 500 error-- see below.

Expected:
You should be taken to preview page.

HTTP Status 500 -

--------------------------------------------------------------------------------
type Exception report

message

description The server encountered an internal error () that prevented it from
fulfilling this request.

exception

javax.servlet.ServletException: java.lang.ClassCastException:
org.mifos.application.surveys.business.QuestionChoice
org.apache.struts.action.RequestProcessor.processException
(RequestProcessor.java:523)
org.mifos.framework.struts.action.MifosRequestProcessor.processActionPer
form(MifosRequestProcessor.java:261)
org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.mifos.framework.security.util.LoginFilter.doFilter
(LoginFilter.java:109)
org.mifos.framework.persistence.DatabaseVersionFilter.doFilter
(DatabaseVersionFilter.java:39)

root cause

java.lang.ClassCastException:
org.mifos.application.surveys.business.QuestionChoice
org.mifos.framework.util.helpers.PPICalculator.calculateScore
(PPICalculator.java:17)
org.mifos.application.surveys.struts.action.SurveyInstanceAction.preview
(SurveyInstanceAction.java:570)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.struts.actions.DispatchAction.dispatchMethod
(DispatchAction.java:274)
org.apache.struts.actions.DispatchAction.execute
(DispatchAction.java:194)
org.mifos.framework.struts.action.BaseAction.execute(BaseAction.java:73)
org.mifos.framework.struts.action.MifosRequestProcessor.processActionPer
form(MifosRequestProcessor.java:227)
org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.mifos.framework.security.util.LoginFilter.doFilter
(LoginFilter.java:109)
org.mifos.framework.persistence.DatabaseVersionFilter.doFilter
(DatabaseVersionFilter.java:39)

note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.14 logs.

--------------------------------------------------------------------------------
Apache Tomcat/6.0.14

Environment

Platform: All, OS: All

Activity

Show:
stephenhorgan
April 1, 2008, 9:47 AM

Created an attachment (id=536)
Selenium test for 1668

stephenhorgan
April 1, 2008, 9:50 AM

Created an attachment (id=537)
Patch for 1668

Keith Pierce
April 2, 2008, 10:27 PM

Fixed in revision 12666 – thanks, Steve!

Jeff Brewster
April 10, 2008, 4:56 PM

change QA contact to Arpita

arpita_a
April 18, 2008, 12:28 PM

Issue Resolved. Same steps mentioned above used.

Environment:
Operating System / Arch / Version Windows XP / x86 / 5.1
Java Vendor / Version Sun Microsystems Inc. / 1.5.0_10
Database Vendor / Version MySQL / 4.1.10-nt
Database Driver / Version MySQL-AB JDBC Driver / mysql-connector-java-5.1.5 (
Revision: ${svn.Revision} )
Application Server Apache Tomcat/6.0.16
Mifos Database Version 190
Subversion Revision Number 12784

Thanks,
Arpita

Fixed

Assignee

stephenhorgan

Reporter

emilytucker

Labels

URL

None

Story Points

None

Team

None

Scheduled For

None

Epic

None

Notify

None

productboard URL

None

Man Day Estimate

None

Components

Fix versions

Affects versions

Priority

Critical
Configure