Re: [Mifos-developer] Offsetting persistence patch submission for feedback

0 views
Skip to first unread message

Dion Dodgen

unread,
Nov 14, 2007, 7:58:51 AM11/14/07
to Developer
Hi Tom, all,

Sorry for the delay, hope you well.
I have reworked the initial patch. All tests pass using the correct
time zone and db use_lower_case_table_names=1.
I would like to patch this dependency as soon as offsetting reaches maturity.

This patch covers all the persistence needs for the Offsetting module.

I am now on suse 10.3 :)

Thanks,
Dion

diondodgen_patch_offsetting_persistence_14112007.tozip

Tom Bostelmann

unread,
Nov 16, 2007, 9:07:41 PM11/16/07
to Developer
Thanks Dion!  I added it to the patch queue - probably going to be next week before I get back to you, though.  Here's the queue wiki:

http://mifos.org/developers/wiki/MifosPatchQueue

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

Dion Dodgen

unread,
Nov 18, 2007, 2:17:57 AM11/18/07
to Developer
Great thanks Tom.

> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Tom Bostelmann

unread,
Nov 21, 2007, 6:17:30 PM11/21/07
to Developer
Dion, the patch needs contain all of the contents of the patch in one file.  There are a couple files, namely 'OffsetTestSuite.java' and 'TestOffsetAccountBO.java' that should be incorporated in the patch.

Can you fix this and then submit it again?  It'd make my life a little easier ;)

Dion Dodgen

unread,
Nov 26, 2007, 1:56:20 AM11/26/07
to Developer
Hi Tom,

Hope you had a good weekend :) I have integrated all resources into
the single patch file.

offsetting_persistence.patch

Tom Bostelmann

unread,
Dec 3, 2007, 4:57:31 PM12/3/07
to Developer
Thanks Dion, apologies for taking a while before getting back to you on this.  Almost there :)

If you're adding a new test, please add it to a package test suite and not the main ApplicationTestSuite.  If you end up having to create a new package test suite, then add that test suite to the parent package's test suite.

Also as a side-note to other developers, make sure that all tests can be executed independently, they should not have a dependency on another test.  Dion, your tests look fine here.  I'm just adding this as a reminder to the other developers.

Dion Dodgen

unread,
Dec 4, 2007, 6:05:40 AM12/4/07
to Developer
Hi,

I seem to be getting 1 error when running the test suite for revision
12211, but all tests seem to be passing.

<system-out><![CDATA[ERROR, org.mifos, MifosExceptionHandler,
logException , 72, No resource is associated with key
"exception.accounts.ApplicationException.CannotAdjust"., 04 Dec 2007
01:07:50
ERROR, org.mifos, MifosExceptionHandler, logException , 72,
exception.accounts.ApplicationException.CannotAdjust, 04 Dec 2007
01:07:50
org.mifos.application.accounts.exceptions.AccountException:
exception.accounts.ApplicationException.CannotAdjust
at org.mifos.application.accounts.business.AccountBO.adjustLastPayment(AccountBO.java:370)
at org.mifos.application.accounts.struts.action.ApplyAdjustment.applyAdjustment(ApplyAdjustment.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at org.mifos.framework.struts.action.BaseAction.execute(BaseAction.java:72)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:290)
at org.mifos.application.accounts.struts.action.TestApplyAdjustmentAction.testAdjustmentForZeroPmnt(TestApplyAdjustmentAction.java:309)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
ERROR, org.mifos, MifosExceptionHandler, logException , 72, You do not
have permissions to perform this activity. Contact your system
administrator to grant you required permissions and try again., 04 Dec
2007 01:08:45
org.mifos.framework.exceptions.ServiceException: error.activity.not.allowed
at org.mifos.application.accounts.business.service.AccountBusinessService.checkPermissionForStatusChange(AccountBusinessService.java:332)
at org.mifos.application.accounts.struts.action.EditStatusAction.checkPermission(EditStatusAction.java:245)
at org.mifos.application.accounts.struts.action.EditStatusAction.update(EditStatusAction.java:130)


Does anybody else get this?

Thanks,
Dion

> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
>

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

Tom Bostelmann

unread,
Dec 4, 2007, 6:54:18 AM12/4/07
to Developer
most likely that's just an uncaught, ignored exception from:

org.mifos.application.accounts.struts.action.TestApplyAdjustmentAction.testAdjustmentForZeroPmnt(TestApplyAdjustmentAction.java:309)

to fix this, you should add a catch block for this exception and explicitly ignore it so that it doesn't fall into stdout and confuse other developers.

On Dec 4, 2007 3:05 AM, Dion Dodgen <dion....@sadalbari.com> wrote:
Hi,

I seem to be getting 1 error when running the test suite for revision
12211, but all tests seem to be passing.

<system-out><![CDATA[ERROR, org.mifos, MifosExceptionHandler,
logException , 72, No resource is associated with key
"exception.accounts.ApplicationException.CannotAdjust"., 04 Dec 2007
01:07:50
ERROR, org.mifos, MifosExceptionHandler, logException , 72,
exception.accounts.ApplicationException.CannotAdjust, 04 Dec 2007
01:07:50
org.mifos.application.accounts.exceptions.AccountException:
exception.accounts.ApplicationException.CannotAdjust
       at org.mifos.application.accounts.business.AccountBO.adjustLastPayment(AccountBO.java :370)
       at org.mifos.application.accounts.struts.action.ApplyAdjustment.applyAdjustment(ApplyAdjustment.java:144)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.struts.actions.DispatchAction.dispatchMethod (DispatchAction.java:274)

       at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
       at org.mifos.framework.struts.action.BaseAction.execute(BaseAction.java:72)
       at org.apache.struts.action.RequestProcessor.processActionPerform (RequestProcessor.java:419)

       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
       at org.apache.struts.action.ActionServlet.doPost (ActionServlet.java:432)
       at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:290)
       at org.mifos.application.accounts.struts.action.TestApplyAdjustmentAction.testAdjustmentForZeroPmnt (TestApplyAdjustmentAction.java:309)

       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)

       at java.lang.reflect.Method.invoke(Method.java:597)
       at junit.framework.TestCase.runTest(TestCase.java:168)
       at junit.framework.TestCase.runBare(TestCase.java :134)
       at junit.framework.TestResult$1.protect(TestResult.java:110)
       at junit.framework.TestResult.runProtected(TestResult.java:128)
       at junit.framework.TestResult.run(TestResult.java:113)
       at junit.framework.TestCase.run(TestCase.java:124)
       at junit.framework.TestSuite.runTest(TestSuite.java:232)
       at junit.framework.TestSuite.run(TestSuite.java:227)
       at junit.framework.TestSuite.runTest (TestSuite.java:232)

       at junit.framework.TestSuite.run(TestSuite.java:227)
       at junit.framework.TestSuite.runTest(TestSuite.java:232)
       at junit.framework.TestSuite.run(TestSuite.java:227)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main (JUnitTestRunner.java:766)

Dion Dodgen

unread,
Dec 4, 2007, 7:30:53 AM12/4/07
to Developer
Thanks Tom, will do so and apply it to the patch.

Dion Dodgen

unread,
Dec 5, 2007, 9:24:53 AM12/5/07
to Developer
Hi Tom,

Hope you well :)

I have not deeply investigated the true cause of the errors, but I did
not update the latest-data.sql with the new database version.
This did not reflect as an issue by a test failing but errors did
cascade into other tests because of this.

I will look into getting a test to fail should the aforementioned
scenario reoccur.

Here is the patch, I added the offsetting tests to the AccountsTestSuite.

svn Revision: 12213

Thanks,
Dion

offsetting_persistence.patch

Dion Dodgen

unread,
Dec 11, 2007, 3:46:21 AM12/11/07
to Developer
Hi Tom and Mifos team,

Hope you all doing well, its a busy time of year.

Just a quick enquiry to the status of the patch, I looked at the patch
queue but it does not reflect the current state.

Cheers,
Dion

Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Tom Bostelmann

unread,
Dec 11, 2007, 1:42:48 PM12/11/07
to Developer
sorry for the delay, Dion. the patch looks good and was submitted to as
rev 12220 in svn.

Dion Dodgen

unread,
Dec 12, 2007, 1:59:41 AM12/12/07
to Developer
no problem at all, thanks Tom :)
Reply all
Reply to author
Forward
0 new messages