Repro:
1. In applicationConfiguration.custom.properties turn off centers by including:
ClientRules.CenterHierarchyExists=false.
2. For this example assume a clean database with two branches (database dump in attachment).
3. Create "group1" in BranchA.
4. Create "group2" in BranchB.
5. Create "client in group1" in group1.
6. From the group details page use "Edit office membership" to move group1 to BranchB.
Expected result:
Group can be successfully moved to BranchB.
Actual result:
Page with stack trace appears (see attached file: error.txt).
This issue is related to MIFOS-4936.
Root cause has been identified. The hibernate session was being flushed and cleared where it should have only been flushed.
Integrated in
head-f-release #165
MIFOS-4965. Changed call to flush and clear session to just flush the session.
MIFOS-4965. Added test shouldTransferGroupFromOfficeToOffice to demonstrate the issue and fix.
MIFOS-4965. Moved other usage of hibernateTransactionHelper.flushAndClearSession to flushSession where it seemed appropriate.
Van Mittal-Henkle : a44ce1bf3a8ef9edfc8b602c72930b486de3d431
Files :
appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelper.java
appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelperForStaticHibernateUtil.java
appdomain/src/main/java/org/mifos/customers/office/business/service/OfficeHierarchyServiceImpl.java
appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java
application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java
Van Mittal-Henkle : f18f56542ae5ef8e502bef124fd0336b9ac4384a
Files :
application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java
Van Mittal-Henkle : 9937435a3858b5ecc8d9ea6bcdbb23fb05228185
Files :
appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java
application/src/test/java/org/mifos/customers/business/service/CenterStatusChangeIntegrationTest.java
appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java
Verified on 10.05.2011
Bug has been fixed properly.
This bug occurs also in G Release. New issue has been created for that
Integrated in
head-g-release-secondary #71
MIFOS-4965. Changed call to flush and clear session to just flush the session.
MIFOS-4965. Added test shouldTransferGroupFromOfficeToOffice to demonstrate the issue and fix.
MIFOS-4965. Moved other usage of hibernateTransactionHelper.flushAndClearSession to flushSession where it seemed appropriate.
Van Mittal-Henkle :
Files :
appdomain/src/main/java/org/mifos/customers/office/business/service/OfficeHierarchyServiceImpl.java
appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelper.java
appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelperForStaticHibernateUtil.java
appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java
appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java
application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java
appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java
Van Mittal-Henkle :
Files :
application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java
Van Mittal-Henkle :
Files :
application/src/test/java/org/mifos/customers/business/service/CenterStatusChangeIntegrationTest.java
appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java
appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java
Integrated in
head-master-secondary #442
MIFOS-4965. Changed call to flush and clear session to just flush the session.
MIFOS-4965. Added test shouldTransferGroupFromOfficeToOffice to demonstrate the issue and fix.
MIFOS-4965. Moved other usage of hibernateTransactionHelper.flushAndClearSession to flushSession where it seemed appropriate.
Van Mittal-Henkle :
Files :
application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java
appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java
appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelper.java
appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelperForStaticHibernateUtil.java
appdomain/src/main/java/org/mifos/customers/office/business/service/OfficeHierarchyServiceImpl.java
Van Mittal-Henkle :
Files :
application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java
Van Mittal-Henkle :
Files :
appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java
appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java
application/src/test/java/org/mifos/customers/business/service/CenterStatusChangeIntegrationTest.java
appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java
appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java