Exception viewing Group details page

Description

Exception occurs when navigating to the Group detail page.

Error message:
Property 'activeClientCount' not found on type
org.mifos.application.customer.group.business.GroupPerformanceHistoryEntity

Repro steps:
1. log onto test server and search for "Group_12".
2. Click on search result "Group_12: ID 0006-000000021"
3. See exception.

Notes:

  • This is reproducible on local dev environment also and can be produced with
    any Group.

  • Also see error when searching for a client and then clicking on the Group
    breadcrumb at top of page.

Environment

Platform: All, OS: All

Activity

Show:
Kay Chau
February 12, 2009, 9:39 PM

reassign to mifosdev, move to Gazelle A

Adam Monsen
February 13, 2009, 10:26 PM

Repro is infallible, thank you.

This issue is a regression resulting from incomplete clean-up of story 1329 (
http://mingle.mifos.org/projects/mifos/cards/1329 ). The reason the problem was
not caught earlier is because it lies in the JSPs.

The Problem:
Some JSPs expect to fetch data directly off business objects. As part of making
POJOs out of existing business objects, some method signatures we augmented to
include persistence-related classes (a form of injection). This injection breaks
JSPs expecting to be able to call these formerly no-argument methods as property
getters.

Example:
See stacktrace on Issue 2366. getActiveClientCount is a method on
GroupPerformanceHistoryEntity, but it now takes an argument, CustomerPersistence
(the injected persistence class).

Idea 1, codename: "Eraser":

  • inject persistence in constructors rather than methods also used as getters by
    JSPs
    + most persistence classes should already be available in constructors other
    than no-arg
    + leave JSPs alone

  • lose immediate visibility of injected persistence

  • must make sure all classes using no-arg constructors also inject persistence
    into business objects before they are used

Idea 2, codename: "Paintbrush":

  • provide JSPs with DTOs
    + gets us closer towards next-generation architecture

  • need to design DTOs

  • need to change JSPs to get data from these DTOs instead of the existing
    business objects

Adam Monsen
February 14, 2009, 12:09 AM

Current plan is to leave JSPs alone, undo method signature changes and inject
persistence as member variables on affected BOs and Entities after no-arg
construction or direct instantiation (by Hibernate, for instance).

Reassigning to Van since I'm done for today (and will be out Tues morning for
class). He'll continue work figuring out scope of affected code by identifying
the number of places to inject persistence after construction or direct
instantiation (instead of in method calls which may be used directly by JSPs).

See also: http://docs.google.com/Doc?id=dcwcngs_8fn77gnf3

Adam Monsen
February 25, 2009, 8:27 PM

Fixed in trunk r14515.

Jeff Brewster
February 26, 2009, 12:24 AM

Verified Group detail page can be reached again. Tested with revision 14520.
Automated Acceptance test class /acceptance/group/GroupTest also added by AdamM.

Fixed

Assignee

Van Mittal-Henkle

Reporter

Jeff Brewster

Labels

None

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