You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by za...@intrasofttechnologies.com on 2021/03/04 04:52:58 UTC

Failing Loan Repayments

Hello Devs.,

 

We have a disturbing scenario with one tenant in our server.

 

We cant post a loan repayment nor transfer funds from savings to loans, on
investigating the logs I came across this:

 

01:00:18.005 [http-bio-443-exec-9] INFO
o.a.f.i.s.f.TenantAwareBasicAuthenticationFilter -
{"startTime":1614808817520,"totalTime":484,"method":"POST","url":"https://[p
ublic_DNS]/fineract-provider/api/v1/loans/364/transactions","parameters":{"c
ommand":["repayment"]}}

01:00:18.008 [http-bio-443-exec-9] ERROR
o.s.boot.context.web.ErrorPageFilter - Forwarding to error page from request
[/api/v1/loans/364/transactions] due to exception [Query "SELECT p FROM
ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE (((p.productId =
:param AND p.productType = :param) AND p.financialAccountType = :param) AND
p.charge.id = :param)" selected 2 results, but expected unique result.;
nested exception is javax.persistence.NonUniqueResultException: Query
"SELECT p FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE
(((p.productId = :param AND p.productType = :param) AND
p.financialAccountType = :param) AND p.charge.id = :param)" selected 2
results, but expected unique result.]

org.springframework.dao.IncorrectResultSizeDataAccessException: Query
"SELECT p FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE
(((p.productId = :param AND p.productType = :param) AND
p.financialAccountType = :param) AND p.charge.id = :param)" selected 2
results, but expected unique result.; nested exception is
javax.persistence.NonUniqueResultException: Query "SELECT p FROM
ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE (((p.productId =
:param AND p.productType = :param) AND p.financialAccountType = :param) AND
p.charge.id = :param)" selected 2 results, but expected unique result.

 

Note: There are other tenants on the same server and all can post loan
payments without any issues. 

 

I believe this is a database related issue.

 

Any ideas on how we can resolve this issue will highly be appreciated. we
have tested the database in both in version 17.07.01 and version 18.03.01
and all getting same error.

 

Thanks & Regards;

*******

Zayyad A. Said | Chairman & C.E.O

Cell No.: +254 716 615274 | Skype: zsaid2011

Email:  <ma...@intrasofttechnologies.com>
zayyad@intrasofttechnologies.com 

Schedule Meetings:  <https://calendly.com/zayyadsaid>
https://calendly.com/zayyadsaid 



 


RE: Failing Loan Repayments

Posted by za...@intrasofttechnologies.com.
Hello,

 

Thanks all for your valuable suggestions, we finally saw where the issue was.

 

We had same fee mapped twice on Advanced Accounting Rules.

 

This was the issue as to why it couldn’t post loan payments, now resolved.

 

Regards;

*******

Zayyad A. Said | Chairman & C.E.O

Cell No.: +254 716 615274 | Skype: zsaid2011

Email:  <ma...@intrasofttechnologies.com> zayyad@intrasofttechnologies.com 

Schedule Meetings:  <https://calendly.com/zayyadsaid> https://calendly.com/zayyadsaid 



 

From: Kelvin Ikome <kv...@gmail.com> 
Sent: Thursday, March 4, 2021 9:16 AM
To: dev@fineract.apache.org
Cc: Mifos software development <mi...@lists.sourceforge.net>
Subject: Re: Failing Loan Repayments

 

Hi Zayyad,

 

It seems to be an issue with the loan product account mapping configurations. Run the following query and check for duplicate entries (replace "3" with your loan product ID).

 

select * from acc_product_mapping where product_id = 3

 

Kelvin :)

 

On Thu, Mar 4, 2021 at 5:53 AM <zayyad@intrasofttechnologies.com <ma...@intrasofttechnologies.com> > wrote:

Hello Devs.,

 

We have a disturbing scenario with one tenant in our server.

 

We cant post a loan repayment nor transfer funds from savings to loans, on investigating the logs I came across this:

 

01:00:18.005 [http-bio-443-exec-9] INFO  o.a.f.i.s.f.TenantAwareBasicAuthenticationFilter - {"startTime":1614808817520,"totalTime":484,"method":"POST","url":"https://[public_DNS]/fineract-provider/api/v1/loans/364/transactions","parameters":{"command":["repayment"]}}

01:00:18.008 [http-bio-443-exec-9] ERROR o.s.boot.context.web.ErrorPageFilter - Forwarding to error page from request [/api/v1/loans/364/transactions] due to exception [Query "SELECT p FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE (((p.productId = :param AND p.productType = :param) AND p.financialAccountType = :param) AND p.charge.id <http://p.charge.id>  = :param)" selected 2 results, but expected unique result.; nested exception is javax.persistence.NonUniqueResultException: Query "SELECT p FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE (((p.productId = :param AND p.productType = :param) AND p.financialAccountType = :param) AND p.charge.id <http://p.charge.id>  = :param)" selected 2 results, but expected unique result.]

org.springframework.dao.IncorrectResultSizeDataAccessException: Query "SELECT p FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE (((p.productId = :param AND p.productType = :param) AND p.financialAccountType = :param) AND p.charge.id <http://p.charge.id>  = :param)" selected 2 results, but expected unique result.; nested exception is javax.persistence.NonUniqueResultException: Query "SELECT p FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE (((p.productId = :param AND p.productType = :param) AND p.financialAccountType = :param) AND p.charge.id <http://p.charge.id>  = :param)" selected 2 results, but expected unique result.

 

Note: There are other tenants on the same server and all can post loan payments without any issues. 

 

I believe this is a database related issue.

 

Any ideas on how we can resolve this issue will highly be appreciated. we have tested the database in both in version 17.07.01 and version 18.03.01 and all getting same error.

 

Thanks & Regards;

*******

Zayyad A. Said | Chairman & C.E.O

Cell No.: +254 716 615274 | Skype: zsaid2011

Email:  <ma...@intrasofttechnologies.com> zayyad@intrasofttechnologies.com 

Schedule Meetings:  <https://calendly.com/zayyadsaid> https://calendly.com/zayyadsaid 



 


Re: Failing Loan Repayments

Posted by Kelvin Ikome <kv...@gmail.com>.
Hi Zayyad,

It seems to be an issue with the loan product account mapping
configurations. Run the following query and check for duplicate entries
(replace "3" with your loan product ID).

select * from acc_product_mapping where product_id = 3

Kelvin :)

On Thu, Mar 4, 2021 at 5:53 AM <za...@intrasofttechnologies.com> wrote:

> Hello Devs.,
>
>
>
> We have a disturbing scenario with one tenant in our server.
>
>
>
> We cant post a loan repayment nor transfer funds from savings to loans, on
> investigating the logs I came across this:
>
>
>
> 01:00:18.005 [http-bio-443-exec-9] INFO
> o.a.f.i.s.f.TenantAwareBasicAuthenticationFilter -
> {"startTime":1614808817520,"totalTime":484,"method":"POST","url":"
> https://[public_DNS]/fineract-provider/api/v1/loans/364/transactions
> ","parameters":{"command":["repayment"]}}
>
> 01:00:18.008 [http-bio-443-exec-9] ERROR
> o.s.boot.context.web.ErrorPageFilter - Forwarding to error page from
> request [/api/v1/loans/364/transactions] due to exception [Query "SELECT p
> FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE (((p.productId
> = :param AND p.productType = :param) AND p.financialAccountType = :param)
> AND p.charge.id = :param)" selected 2 results, but expected unique
> result.; nested exception is javax.persistence.NonUniqueResultException:
> Query "SELECT p FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?
> WHERE (((p.productId = :param AND p.productType = :param) AND
> p.financialAccountType = :param) AND p.charge.id = :param)" selected 2
> results, but expected unique result.]
>
> org.springframework.dao.IncorrectResultSizeDataAccessException: Query
> "SELECT p FROM ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE
> (((p.productId = :param AND p.productType = :param) AND
> p.financialAccountType = :param) AND p.charge.id = :param)" selected 2
> results, but expected unique result.; nested exception is
> javax.persistence.NonUniqueResultException: Query "SELECT p FROM
> ProductToGLAccountMapping p LEFT JOIN p.charge ?  WHERE (((p.productId =
> :param AND p.productType = :param) AND p.financialAccountType = :param) AND
> p.charge.id = :param)" selected 2 results, but expected unique result.
>
>
>
> *Note: There are other tenants on the same server and all can post loan
> payments without any issues. *
>
>
>
> I believe this is a database related issue.
>
>
>
> Any ideas on how we can resolve this issue will highly be appreciated. we
> have tested the database in both in version 17.07.01 and version 18.03.01
> and all getting same error.
>
>
>
> Thanks & Regards;
>
> *********
>
> *Zayyad A. Said | Chairman & C.E.O*
>
> Cell No.: +254 716 615274 | Skype: *zsaid2011*
>
> Email: zayyad@intrasofttechnologies.com
>
> Schedule Meetings: https://calendly.com/zayyadsaid
>
>
>