Re: Failing Loan Repayments

2021-03-03 Thread Kelvin Ikome
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  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: zay...@intrasofttechnologies.com
>
> Schedule Meetings: https://calendly.com/zayyadsaid
>
>
>


Failing Loan Repayments

2021-03-03 Thread zayyad
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:  
zay...@intrasofttechnologies.com 

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