[ 
http://mifosforge.jira.com/browse/MIFOS-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

johnwoodlock resolved MIFOS-2098.
---------------------------------

             Team: Core
         Assignee: johnwoodlock  (was: Kay Chau)
       Resolution: Fixed
    Scheduled For: Release
    Fix Version/s:     (was: Gazelle Backlog)
                   Release 1.5

> GenerateScheduleForCustomerAndSavingsTask batch job hangs in v1.1
> -----------------------------------------------------------------
>
>                 Key: MIFOS-2098
>                 URL: http://mifosforge.jira.com/browse/MIFOS-2098
>             Project: mifos
>          Issue Type: Bug
>          Components: Batch jobs
>    Affects Versions: Release 1.1
>         Environment: Platform: All, OS: All
>            Reporter: kimloanho
>            Assignee: johnwoodlock
>            Priority: Major
>             Fix For: Release 1.5
>
>         Attachments: bad_data_in_GK_database.sql, 
> hack_01_ignore_bad_recs.diff, hack_02_ignore_missing_accounts.diff, 
> issue2098_continued_work.diff, more_trials.diff, TaskException.txt
>
>
> When the task GenerateMeetingsForCustomerAndSavingsTask runs on GK database it
> throws exception at some record after the 49000th record (see attachment
> Exception). This exception is thrown because when the task generates meetings
> for customer account 209866 it tries to generate the next installment id for 
> the
> current installment id of 32767 (max of smallint) and since the installment id
> column of the customer_schedule table is of type smallint (short in code) it
> fails to convert the number to short. 
> The column Installment_Id of the table Customer_Schedule needs to be changed 
> to
> integer. However, by doing so there will be a lot of code and database changes
> because:
> 1. The Customer_Schedule, Loan_Schedule and Savings_Schedule are mapped to
> classes which are derived from the base class AccountActionDateEntity so if we
> change the installment id to integer there will be a lot of code change due to
> changes in the  AccountActionDateEntity, Customer_Schedule, Loan_Schedule and
> Savings_Schedule.
> 2. Database changes: Make sure that installment Id links to other tables are
> changed, too.
> 3. After fixing this, the code needs to be modified to improve the performance
> of the task GenerateMeetingsForCustomerAndSavingsTask because it has the same
> problem as the LoanArreasTask (committing one record at a time). The code for
> this change has been done in the attachment
> GenerateMeetingsForCustomerAndSavingsHelper.java.
> 4. Test the GenerateMeetingsForCustomerAndSavingsTask on testblue:
> a. Modify hibernate.properties before build or you can change the
> hibernate.properties after you upload the mifos.war and use WinRar to open and
> edit it. The change is
> hibernate.connection.url=jdbc:mysql://testblue.mifos.org:3308/mifos?useUnicode=true&characterEncoding=UTF-8
> instead of
> hibernate.connection.url=jdbc:mysql://localhost:3306/mifos?useUnicode=true&characterEncoding=UTF-8
> b. Modify the task.xml (again before build or on testblue using WinRar) so 
> that
> it will run only the task of your choice.
> <?xml version="1.0"?>
> <scheduler-tasks>
>       <scheduler>
> <task-class-name>GenerateMeetingsForCustomerAndSavingsTask</task-class-name>
>               <initial-time>01:00:00</initial-time>
>               <delay-time>86400</delay-time>
>       </scheduler>
> </scheduler-tasks>
> I set the time to 1am so it will run right after you start Tomcat.
> c. Compile the code and ftp it first to test.mifos.org and you can save it in
> the folder Issue2078 (you can delete the old one), then from testblue ftp get
> the mifos.war to the directory
> E:\MifosApplication-GK-1.1\apache-tomcat-6.0.16\bin>
> d. The directory on testblue for this testing is
> E:\MifosApplication-GK-1.1\mysql-5.0.51b-win32. Copy the folder 'data' from 
> the
>  locations:
> 1) H:\mysql-backups\mysql-5.0.51b-win32-db-version-204\data if you want the GK
> database with no tasks run.
> 2) H:\backups_from_E\mysql\GKDatabaseVersion204AfterLoanArrearsTaskWasRun\data
> if you want the 1) GK database with the LoanArrearsTask ran on top. I use the 
> 2)
> copy because it takes a long time to run the  LoanArrearsTask and I think the
> task LoanArrearsTask can be run before the
> GenerateMeetingsForCustomerAndSavingsTask.
> 3) After copying the data folder to the E drive you need to start mysql server
> E:\MifosApplication-GK-1.1\mysql-5.0.51b-win32\bin>mysqld-nt.exe --console -P 
> 33
> 08.
> 4) If you want to remote debugging from your machine you can start a mysql
> session (E:\MifosApplication-GK-1.1\mysql-5.0.51b-win32\bin>mysql --port=3308 
> -u
> root -p) and execute this query:
> mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mysql' WITH 
> GRAN
> T OPTION;
> to allow your machine to connect to the remote database.
> 5) Start Tomcat E:\MifosApplication-GK-1.1\apache-tomcat-6.0.16\bin>startup
> The task GenerateMeetingsForCustomerAndSavingsTask will finish around 40 hrs 
> if
> it can finish it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to