[
http://mifosforge.jira.com/browse/MIFOS-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58858#action_58858
]
johnwoodlock commented on MIFOS-3312:
-------------------------------------
I used a test secdep database that Van gave me. I loaded it and ran against
the latest V1.5 war file. I put in some sysprints to help debug the problem.
The batch job is falling over whilst processing savings accounts because of a
null pointer error due to logic bug. (there may be more than one problem but in
the one's I've sampled so far this is the main one)
The offending code is in SavingsBO.java - method calculateInterest
----
trxn = trxn.getAccountPayment().getAmount().isGreaterThanZero() ?
getLastTrxnForPayment(trxn
.getAccountPayment()) :
getLastTrxnForAdjustedPayment(trxn.getAccountPayment());
if (!savedTrxn.getAccountTrxnId().equals(trxn.getAccountTrxnId()))
{ FALLS OVER HERE WITH NULL POINTER EXCEPTION for object trxn
initialBalance = false;
}
-----
It triggers for savings accounts that have posted a zero interest transaction
(account action 11) (last and maybe first transactions... not definite yet) and
haven't had any deposits/withdraws since then.
Based on the sample accounts I looked at (e.g. 44260, 44002, 9211)
trxn.getAccountPayment().getAmount() above returns zero which pushes the flow
into 'getLastTrxnForAdjustedPayment' and that returns null which is not
suprising as it is meant to be only for adjusted payments (not interest
posting).
I haven't fully got across the whole process yet, I will continue on tomorrow
unless someone beats me to it.
In my test run there were 1389 failing accounts
The following query brings them all back on Van's test data
select sa.account_id from account a
join savings_account sa on sa.account_id = a.account_id
where sa.next_int_calc_date < curdate() and
a.account_state_id in (16,18)
> Interest not posting for savings accounts in 1.5
> ------------------------------------------------
>
> Key: MIFOS-3312
> URL: http://mifosforge.jira.com/browse/MIFOS-3312
> Project: mifos
> Issue Type: Bug
> Components: Savings Account
> Affects Versions: Release 1.5
> Reporter: jbrewster
> Assignee: johnwoodlock
> Priority: Critical
> Fix For: Shamim D, Release E - Iteration 2, Release E
>
> Attachments: debugMifoslog.txt, issue3312SavingsIntCalcErrors.txt,
> screenshot-1.jpg
>
>
> SECDEP reported several accounts were not posting interest on their 3 month
> interest posting date - 30 June 2010.
> I've confirmed that many accounts were flagged in the SavingsIntCalcTask as
> of 30 June. Previously, a few tasks were flagged every day (see MIFOS-2714).
> A large list appears every day starting 30 June. Note the attached list may
> be truncated and not completely list all failed postings.
>
>
>
>
> Here is the error listed in Mifos.log:
> org.mifos.framework.components.batchjobs.exceptions.BatchJobException: Failure
> at
> org.mifos.framework.components.batchjobs.helpers.SavingsIntCalcHelper.execute(SavingsIntCalcHelper.java:67)
> at
> org.mifos.framework.components.batchjobs.TaskHelper.perform(TaskHelper.java:201)
> at
> org.mifos.framework.components.batchjobs.TaskHelper.executeTask(TaskHelper.java:114)
> at
> org.mifos.framework.components.batchjobs.MifosTask.run(MifosTask.java:55)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> 2010-07-07/00:13:16.698/PHT INFO, org.mifos.framework.components.batchjobs,
> TaskHelper, executeTask, 113, SavingsIntCalcTask will run catch-up execution
> for Sat Jan 02 08:00:20 PHT 2010
> I've taken a snapshot of the SECDEP test database for further debugging.
--
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
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues