Michael Vorburger created FINERACT-1086:
-------------------------------------------
Summary: JpaOptimisticLockingFailureException at
LoanSchedularServiceImpl.recalculateInterest() - requires retry logic?
Key: FINERACT-1086
URL: https://issues.apache.org/jira/browse/FINERACT-1086
Project: Apache Fineract
Issue Type: Bug
Reporter: Michael Vorburger
See FINERACT-932 for general background; I've found this in logs of
https://www.fineract.dev:
{noformat}org.springframework.orm.jpa.JpaOptimisticLockingFailureException:
Optimistic locking errors were detected when flushing to the data store. The
following objects may have been concurrently modified in another transaction:
[org.apache.fineract.portfolio.loanaccount.domain.Loan-12,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-148,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-146,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-144,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-149,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-141,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-145,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-140,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-142,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-147,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-143,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-150,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3944,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3942,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3945,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3941,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3940,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3939,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3937,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3938,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3943,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3946,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3947];
nested exception is <openjpa-3.1.1-r1440702 nonfatal store error>
org.apache.openjpa.persistence.OptimisticLockException: Optimistic locking
errors were detected when flushing to the data store. The following objects may
have been concurrently modified in another transaction:
[org.apache.fineract.portfolio.loanaccount.domain.Loan-12,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-148,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-146,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-144,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-149,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-141,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-145,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-140,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-142,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-147,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-143,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-150,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3944,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3942,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3945,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3941,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3940,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3939,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3937,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3938,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3943,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3946,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3947]
at
org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible
(EntityManagerFactoryUtils.java:397)
at
org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible
(DefaultJpaDialect.java:128)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit
(JpaTransactionManager.java:538)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit
(AbstractPlatformTransactionManager.java:743)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit
(AbstractPlatformTransactionManager.java:711)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning
(TransactionAspectSupport.java:631)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction
(TransactionAspectSupport.java:385)
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.loanaccount.service.LoanWritePlatformServiceJpaRepositoryImpl$$EnhancerBySpringCGLIB$$f838ffc.recalculateInterest
(<generated>)
at
org.apache.fineract.portfolio.loanaccount.service.LoanSchedularServiceImpl.recalculateInterest
(LoanSchedularServiceImpl.java:138)
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)
Caused by: <openjpa-3.1.1-r1440702 nonfatal store error>
org.apache.openjpa.persistence.OptimisticLockException: Optimistic locking
errors were detected when flushing to the data store. The following objects may
have been concurrently modified in another transaction:
[org.apache.fineract.portfolio.loanaccount.domain.Loan-12,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-148,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-146,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-144,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-149,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-141,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-145,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-140,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-142,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-147,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-143,
org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails-150,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3944,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3942,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3945,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3941,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3940,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3939,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3937,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3938,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3943,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3946,
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment-3947]
at org.apache.openjpa.kernel.BrokerImpl.newFlushException
(BrokerImpl.java:2459)
at org.apache.openjpa.kernel.BrokerImpl.flush (BrokerImpl.java:2308)
at org.apache.openjpa.kernel.BrokerImpl.flushSafe (BrokerImpl.java:2199)
at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion
(BrokerImpl.java:2116)
at org.apache.openjpa.kernel.LocalManagedRuntime.commit
(LocalManagedRuntime.java:84)
at org.apache.openjpa.kernel.BrokerImpl.commit (BrokerImpl.java:1600)
at org.apache.openjpa.kernel.DelegatingBroker.commit
(DelegatingBroker.java:1035)
at org.apache.openjpa.persistence.EntityManagerImpl.commit
(EntityManagerImpl.java:669)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit
(JpaTransactionManager.java:534){noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)