Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-850 Random Failing Integration Test
  3. FINERACT-852

ArrayIndexOutOfBoundsException in ClientSavingsIntegrationTest and SchedulerJobsTest

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None

      Description

      https://github.com/apache/fineract/pull/719 fails ITs, due this may be unrelated to the changes in that particular PR, especially if we start seeing this in builds of other PRs:

       

      From https://travis-ci.org/apache/fineract/builds/658741690 :

      > Task :integrationTest
      
      org.apache.fineract.integrationtests.ClientSavingsIntegrationTest > testSavingsAccount_DormancyTracking FAILED
      
          java.lang.ArrayIndexOutOfBoundsException at ClientSavingsIntegrationTest.java:1977
      
      Could not execute query org.drizzle.jdbc.internal.common.query.DrizzleParameterizedQuery@7049dae4: Deadlock found when trying to get lock; try restarting transaction
      
      Failed Query Report SQL=UPDATE m_loan SET version = ?, total_costofloan_derived = ?, total_expected_costofloan_derived = ?, total_expected_repayment_derived = ?, fee_charges_charged_derived = ?, total_charges_due_at_disbursement_derived = ?, fee_charges_outstanding_derived = ?, fee_charges_repaid_derived = ?, fee_charges_waived_derived = ?, fee_charges_writtenoff_derived = ?, interest_charged_derived = ?, interest_outstanding_derived = ?, interest_repaid_derived = ?, interest_waived_derived = ?, interest_writtenoff_derived = ?, total_outstanding_derived = ?, penalty_charges_charged_derived = ?, penalty_charges_outstanding_derived = ?, penalty_charges_repaid_derived = ?, penalty_charges_waived_derived = ?, penalty_charges_writtenoff_derived = ?, principal_disbursed_derived = ?, principal_outstanding_derived = ?, principal_repaid_derived = ?, principal_writtenoff_derived = ?, total_repayment_derived = ?, total_waived_derived = ?, total_writtenoff_derived = ? WHERE id = ? AND version = ?; time=3 ms;
      
      Could not execute query org.drizzle.jdbc.internal.common.query.DrizzleParameterizedQuery@69a49a39: Deadlock found when trying to get lock; try restarting transaction
      
      Failed Query Report SQL=UPDATE m_loan SET version = ?, total_costofloan_derived = ?, total_expected_costofloan_derived = ?, total_expected_repayment_derived = ?, fee_charges_charged_derived = ?, total_charges_due_at_disbursement_derived = ?, fee_charges_outstanding_derived = ?, fee_charges_repaid_derived = ?, fee_charges_waived_derived = ?, fee_charges_writtenoff_derived = ?, interest_charged_derived = ?, interest_outstanding_derived = ?, interest_repaid_derived = ?, interest_waived_derived = ?, interest_writtenoff_derived = ?, total_outstanding_derived = ?, penalty_charges_charged_derived = ?, penalty_charges_outstanding_derived = ?, penalty_charges_repaid_derived = ?, penalty_charges_waived_derived = ?, penalty_charges_writtenoff_derived = ?, principal_disbursed_derived = ?, principal_outstanding_derived = ?, principal_repaid_derived = ?, principal_writtenoff_derived = ?, total_repayment_derived = ?, total_waived_derived = ?, total_writtenoff_derived = ? WHERE id = ? AND version = ?; time=4 ms;
      
      Could not execute query org.drizzle.jdbc.internal.common.query.DrizzleParameterizedQuery@6a93282: Deadlock found when trying to get lock; try restarting transaction
      
      Failed Query Report SQL=UPDATE m_loan SET version = ?, total_costofloan_derived = ?, total_expected_costofloan_derived = ?, total_expected_repayment_derived = ?, fee_charges_charged_derived = ?, total_charges_due_at_disbursement_derived = ?, fee_charges_outstanding_derived = ?, fee_charges_repaid_derived = ?, fee_charges_waived_derived = ?, fee_charges_writtenoff_derived = ?, interest_charged_derived = ?, interest_outstanding_derived = ?, interest_repaid_derived = ?, interest_waived_derived = ?, interest_writtenoff_derived = ?, total_outstanding_derived = ?, penalty_charges_charged_derived = ?, penalty_charges_outstanding_derived = ?, penalty_charges_repaid_derived = ?, penalty_charges_waived_derived = ?, penalty_charges_writtenoff_derived = ?, principal_disbursed_derived = ?, principal_outstanding_derived = ?, principal_repaid_derived = ?, principal_writtenoff_derived = ?, total_repayment_derived = ?, total_waived_derived = ?, total_writtenoff_derived = ? WHERE id = ? AND version = ?; time=4 ms;
      
      22:08:35.607 [http-bio-8443-exec-32] INFO  o.a.f.c.s.PortfolioCommandSourceWritePlatformServiceImpl - The following command {"note":"Repayment Made!!!","dateFormat":"dd MMMM yyyy","transactionAmount":"300.0","locale":"en","transactionDate":"22 October 2011"} has been retried  0 time(s)
      
      22:08:35.607 [http-bio-8443-exec-32] WARN  o.a.f.c.s.PortfolioCommandSourceWritePlatformServiceImpl - The following command {"note":"Repayment Made!!!","dateFormat":"dd MMMM yyyy","transactionAmount":"300.0","locale":"en","transactionDate":"22 October 2011"} has been retried for the max allowed attempts of 0 and will be rolled back
      
      The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
      
      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-19]; nested exception is <openjpa-3.1.0-rafcec21a1d489dff682a3ce7986fac6a1c80e8e0 fatal 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-19]
      
      	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.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:528)
      
      	at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
      
      	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
      
      	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153)
      
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      
      	at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:178)
      
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      
      	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
      
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      
      	at com.sun.proxy.$Proxy358.saveAndFlush(Unknown Source)
      
      	at org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper.saveAndFlush(LoanRepositoryWrapper.java:71)
      
      	at org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper$$FastClassBySpringCGLIB$$756b1584.invoke(<generated>)
      
      	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
      
      	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:685)
      
      	at org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper$$EnhancerBySpringCGLIB$$c3a953d8.saveAndFlush(<generated>)
      
      	at org.apache.fineract.portfolio.loanaccount.domain.LoanAccountDomainServiceJpa.saveAndFlushLoanWithDataIntegrityViolationChecks(LoanAccountDomainServiceJpa.java:262)
      
      (...)
      
      Caused by: <openjpa-3.1.0-rafcec21a1d489dff682a3ce7986fac6a1c80e8e0 fatal 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-19]
      
      	at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2459)
      
      (...)
      
       > Task :integrationTest
      
      org.apache.fineract.integrationtests.SchedulerJobsTest > testSchedulerJobs FAILED
      
          java.lang.ArrayIndexOutOfBoundsException
      
      348 tests completed, 2 failed, 13 skipped

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vorburger Michael Vorburger
                Reporter:
                vorburger Michael Vorburger
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h