[
https://issues.apache.org/jira/browse/FINERACT-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17194746#comment-17194746
]
Michael Vorburger commented on FINERACT-1085:
---------------------------------------------
[~ptuomola] the stack trace above is from a scheduled job (starting point is
SavingsSchedularServiceImpl.postInterestForAccounts() in the original and
LoanSchedularServiceImpl.recalculateInterest() in the 2nd one), and not from a
REST API *Resource class, so we cannot easily directly return this error as a
HTTP 400 to the user. What I'm guessing is needed here is to prevent the
underlying condition which causes this ("backdated transactions for dates
before the ledger closure") from being entered in the system. I am personally
not familiar enough with the details of this to understand how/where this would
need to be done. I also don't know if, even if it was validated, an
administrator can change ledge closure dates and still cause this? I guess even
that would have to be validated for.
> JournalEntryInvalidException: Journal entry cannot be made prior to last
> account closing date for the branch at
> org.apache.fineract.accounting.journalentry.service.AccountingProcessorHelper.checkForBranchClosures()
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: FINERACT-1085
> URL: https://issues.apache.org/jira/browse/FINERACT-1085
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Michael Vorburger
> Priority: Blocker
>
> See FINERACT-932 for general background; I've found this in logs of
> [https://www.fineract.dev|https://www.fineract.dev/]:
> {noformat}org.apache.fineract.accounting.journalentry.exception.JournalEntryInvalidException:
> Journal entry cannot be made prior to last account closing date for the
> branch
> at
> org.apache.fineract.accounting.journalentry.service.AccountingProcessorHelper.checkForBranchClosures
> (AccountingProcessorHelper.java:536)
> at
> org.apache.fineract.accounting.journalentry.service.CashBasedAccountingProcessorForSavings.createJournalEntriesForSavings
> (CashBasedAccountingProcessorForSavings.java:61)
> at
> org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformServiceJpaRepositoryImpl.createJournalEntriesForSavings
> (JournalEntryWritePlatformServiceJpaRepositoryImpl.java:527)
> at
> org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformServiceJpaRepositoryImpl$$FastClassBySpringCGLIB$$56a41c76.invoke
> (<generated>)
> at org.springframework.cglib.proxy.MethodProxy.invoke
> (MethodProxy.java:218)
> at
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint
> (CglibAopProxy.java:771)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:163)
> at
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed
> (CglibAopProxy.java:749)
> at
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction
> (TransactionAspectSupport.java:366)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke
> (TransactionInterceptor.java:118)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:186)
> at
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed
> (CglibAopProxy.java:749)
> at
> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept
> (CglibAopProxy.java:691)
> at
> org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformServiceJpaRepositoryImpl$$EnhancerBySpringCGLIB$$43aec1a8.createJournalEntriesForSavings
> (<generated>)
> at
> org.apache.fineract.portfolio.savings.service.SavingsAccountWritePlatformServiceJpaRepositoryImpl.postJournalEntries
> (SavingsAccountWritePlatformServiceJpaRepositoryImpl.java:1315)
> at
> org.apache.fineract.portfolio.savings.service.SavingsAccountWritePlatformServiceJpaRepositoryImpl.postInterest
> (SavingsAccountWritePlatformServiceJpaRepositoryImpl.java:573)
> at
> org.apache.fineract.portfolio.savings.service.SavingsAccountWritePlatformServiceJpaRepositoryImpl$$FastClassBySpringCGLIB$$fa18015c.invoke
> (<generated>)
> at org.springframework.cglib.proxy.MethodProxy.invoke
> (MethodProxy.java:218)
> at
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint
> (CglibAopProxy.java:771)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:163)
> at
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed
> (CglibAopProxy.java:749)
> at
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction
> (TransactionAspectSupport.java:366)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke
> (TransactionInterceptor.java:118)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:186)
> at
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed
> (CglibAopProxy.java:749)
> at
> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept
> (CglibAopProxy.java:691)
> at
> org.apache.fineract.portfolio.savings.service.SavingsAccountWritePlatformServiceJpaRepositoryImpl$$EnhancerBySpringCGLIB$$9155b01a.postInterest
> (<generated>)
> at
> org.apache.fineract.portfolio.savings.service.SavingsSchedularServiceImpl.postInterestForAccounts
> (SavingsSchedularServiceImpl.java:76)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:566)
> at org.springframework.util.MethodInvoker.invoke
> (MethodInvoker.java:283)
> at
> org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal
> (MethodInvokingJobDetailFactoryBean.java:267)
> at org.springframework.scheduling.quartz.QuartzJobBean.execute
> (QuartzJobBean.java:75)
> at org.quartz.core.JobRunShell.run (JobRunShell.java:202)
> at org.quartz.simpl.SimpleThreadPool$WorkerThread.run
> (SimpleThreadPool.java:573){noformat}
> It reminds me of FINERACT-1067 (but seems to be a completely different
> error), but I have similar thoughts: Perhaps this is more of an "effect",
> with the "cause" really being some... missing validation somewhere, for
> before/after dates?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)